[CMF-checkins] CVS: CMF/CMFCore - ActionProviderBase.py:1.17 ActionsTool.py:1.38 CatalogTool.py:1.40 MemberDataTool.py:1.22 MembershipTool.py:1.32

Yvo Schubbe schubbe@web.de
Thu, 13 Feb 2003 02:44:08 -0500


Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv12278/CMFCore

Modified Files:
	ActionProviderBase.py ActionsTool.py CatalogTool.py 
	MemberDataTool.py MembershipTool.py 
Log Message:
Merged yuppie-collector123-branch:
- Changed _actions' making them tuples. (Collector #123)

=== CMF/CMFCore/ActionProviderBase.py 1.16 => 1.17 ===
--- CMF/CMFCore/ActionProviderBase.py:1.16	Tue Feb  4 17:06:21 2003
+++ CMF/CMFCore/ActionProviderBase.py	Thu Feb 13 02:44:07 2003
@@ -1,7 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2002, 2003 Zope Corporation and Contributors.
-# All Rights Reserved.
+# Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved.
 #
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
@@ -28,7 +27,6 @@
 
 
 class ActionProviderBase:
-
     """ Provide ActionTabs and management methods for ActionProviders
     """
 
@@ -36,7 +34,8 @@
 
     security = ClassSecurityInfo()
 
-    _actions = []
+    _actions = ()
+
     _actions_form = DTMLFile( 'editToolsActions', _dtmldir )
 
     manage_options = ( { 'label' : 'Actions'
@@ -50,10 +49,9 @@
     #
     security.declarePrivate( 'listActions' )
     def listActions( self, info=None ):
-
         """ Return all the actions defined by a provider.
         """
-        return self._actions or []
+        return self._actions or ()
 
     #
     #   ZMI methods


=== CMF/CMFCore/ActionsTool.py 1.37 => 1.38 ===
--- CMF/CMFCore/ActionsTool.py:1.37	Tue Feb  4 17:06:21 2003
+++ CMF/CMFCore/ActionsTool.py	Thu Feb 13 02:44:07 2003
@@ -1,7 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2001-2003 Zope Corporation and Contributors.
-# All Rights Reserved.
+# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
 #
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
@@ -45,7 +44,8 @@
     __implements__ = (IActionsTool, ActionProviderBase.__implements__)
 
     id = 'portal_actions'
-    _actions = [ActionInformation(id='folderContents'
+    meta_type = 'CMF Actions Tool'
+    _actions = (ActionInformation(id='folderContents'
                                 , title='Folder contents'
                                 , action=Expression(
                text='string: ${folder_url}/folder_contents')
@@ -64,9 +64,8 @@
                                 , permissions=('List folder contents',)
                                 , category='folder'
                                 , visible=1
-                                 )]
-
-    meta_type = 'CMF Actions Tool'
+                                 )
+               )
 
     action_providers = ( 'portal_membership'
                        , 'portal_actions'
@@ -115,8 +114,8 @@
             for item in providers:
                 if item not in chosen:
                     new_providers.append(item)
-            providers = tuple(new_providers)
-        self.action_providers = providers
+            providers = new_providers
+        self.action_providers = tuple(providers)
         if REQUEST is not None:
             return self.manage_actionProviders(self , REQUEST
                           , manage_tabs_message='Providers changed.')


=== CMF/CMFCore/CatalogTool.py 1.39 => 1.40 ===
--- CMF/CMFCore/CatalogTool.py:1.39	Tue Feb  4 17:07:14 2003
+++ CMF/CMFCore/CatalogTool.py	Thu Feb 13 02:44:07 2003
@@ -1,7 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2001-2003 Zope Corporation and Contributors.
-# All Rights Reserved.
+# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
 #
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
@@ -72,15 +71,16 @@
 
 
 class CatalogTool (UniqueObject, ZCatalog, ActionProviderBase):
-    '''This is a ZCatalog that filters catalog queries.
-    '''
+    """ This is a ZCatalog that filters catalog queries.
+    """
 
     __implements__ = (ICatalogTool, ActionProviderBase.__implements__)
 
     id = 'portal_catalog'
     meta_type = 'CMF Catalog'
+    _actions = ()
+
     security = ClassSecurityInfo()
-    _actions = []
 
     manage_options = ( ZCatalog.manage_options +
                       ActionProviderBase.manage_options +


=== CMF/CMFCore/MemberDataTool.py 1.21 => 1.22 ===
--- CMF/CMFCore/MemberDataTool.py:1.21	Tue Feb  4 17:12:47 2003
+++ CMF/CMFCore/MemberDataTool.py	Thu Feb 13 02:44:07 2003
@@ -1,7 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2001-2003 Zope Corporation and Contributors.
-# All Rights Reserved.
+# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
 #
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
@@ -38,14 +37,15 @@
 
 
 class MemberDataTool (UniqueObject, SimpleItem, PropertyManager, ActionProviderBase):
-    '''This tool wraps user objects, making them act as Member objects.
-    '''
+    """ This tool wraps user objects, making them act as Member objects.
+    """
 
     __implements__ = (IMemberDataTool, ActionProviderBase.__implements__)
 
     id = 'portal_memberdata'
     meta_type = 'CMF Member Data Tool'
-    _actions = []
+    _actions = ()
+
     _v_temps = None
     _properties = ()
 


=== CMF/CMFCore/MembershipTool.py 1.31 => 1.32 ===
--- CMF/CMFCore/MembershipTool.py:1.31	Tue Feb  4 17:17:40 2003
+++ CMF/CMFCore/MembershipTool.py	Thu Feb 13 02:44:07 2003
@@ -1,7 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2001-2003 Zope Corporation and Contributors.
-# All Rights Reserved.
+# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
 #
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
@@ -43,17 +42,21 @@
 '''
 
 class MembershipTool (UniqueObject, SimpleItem, ActionProviderBase):
-    # This tool accesses member data through an acl_users object.
-    # It can be replaced with something that accesses member data in
-    # a different way.
+    """ This tool accesses member data through an acl_users object.
+
+    It can be replaced with something that accesses member data in a
+    different way.
+    """
 
     __implements__ = (IMembershipTool, ActionProviderBase.__implements__)
 
     id = 'portal_membership'
     meta_type = 'CMF Membership Tool'
-    _actions = []
-    security = ClassSecurityInfo()
+    _actions = ()
+
     memberareaCreationFlag = 1
+
+    security = ClassSecurityInfo()
 
     manage_options=( ({ 'label' : 'Configuration'
                      , 'action' : 'manage_mapRoles'