[CMF-checkins] CVS: Products/CMFCore - ActionProviderBase.py:1.30.2.4 ActionsTool.py:1.51.2.3 DiscussionTool.py:1.17.2.4 WorkflowTool.py:1.46.2.7

Yvo Schubbe y.2005- at wcm-solutions.de
Mon Jun 20 13:19:22 EDT 2005


Update of /cvs-repository/Products/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv696/CMFCore

Modified Files:
      Tag: CMF-1_5-branch
	ActionProviderBase.py ActionsTool.py DiscussionTool.py 
	WorkflowTool.py 
Log Message:
- removed redundant 'context' argument from _getOAI and _getExprContext
- import and whitespace cleanup


=== Products/CMFCore/ActionProviderBase.py 1.30.2.3 => 1.30.2.4 ===
--- Products/CMFCore/ActionProviderBase.py:1.30.2.3	Mon Jun 20 05:24:33 2005
+++ Products/CMFCore/ActionProviderBase.py	Mon Jun 20 13:19:21 2005
@@ -82,7 +82,7 @@
         # List ActionInfo objects.
         # (method is without docstring to disable publishing)
         #
-        ec = self._getExprContext(self, object)
+        ec = self._getExprContext(object)
         actions = self.listActions(object=object)
         actions = [ ActionInfo(action, ec) for action in actions ]
 
@@ -324,10 +324,10 @@
                                 , visible=visible
                                 )
 
-    def _getOAI(self, context, object):
-        return getOAI(context, object)
-        
-    def _getExprContext(self, context, object):
-        return getExprContext(context, object)
+    def _getOAI(self, object):
+        return getOAI(self, object)
+
+    def _getExprContext(self, object):
+        return getExprContext(self, object)
 
 InitializeClass(ActionProviderBase)


=== Products/CMFCore/ActionsTool.py 1.51.2.2 => 1.51.2.3 ===
--- Products/CMFCore/ActionsTool.py:1.51.2.2	Mon Jun 20 05:24:33 2005
+++ Products/CMFCore/ActionsTool.py	Mon Jun 20 13:19:21 2005
@@ -24,10 +24,8 @@
 from OFS.Folder import Folder
 
 from ActionInformation import ActionInformation
-from ActionInformation import getOAI
 from ActionProviderBase import ActionProviderBase
 from Expression import Expression
-from Expression import getExprContext
 from interfaces.portal_actions import ActionProvider as IActionProvider
 from interfaces.portal_actions import portal_actions as IActionsTool
 from permissions import ListFolderContents
@@ -197,12 +195,12 @@
              'portal_actions will ignore listActions() of \'%s\'.'
              % provider.getId(),
              DeprecationWarning)
-        info = self._getOAI(self, object)
+        info = self._getOAI(object)
         actions = provider.listActions(info)
 
         action_infos = []
         if actions and not isinstance(actions[0], dict):
-            ec = self._getExprContext(self, object)
+            ec = self._getExprContext(object)
             for ai in actions:
                 if not ai.getVisibility():
                     continue


=== Products/CMFCore/DiscussionTool.py 1.17.2.3 => 1.17.2.4 ===
--- Products/CMFCore/DiscussionTool.py:1.17.2.3	Mon Jun 20 05:24:33 2005
+++ Products/CMFCore/DiscussionTool.py	Mon Jun 20 13:19:21 2005
@@ -21,7 +21,6 @@
 from AccessControl import ClassSecurityInfo
 
 from ActionProviderBase import ActionProviderBase
-from ActionInformation import getOAI
 from permissions import AccessContentsInformation
 from permissions import ManagePortal
 from permissions import ReplyToItem
@@ -160,7 +159,7 @@
     def listActions(self, info=None, object=None):
         # Return actions for reply and show replies
         if object is not None or info is None:
-            info = self._getOAI(self, object)
+            info = self._getOAI(object)
         content = info.object
         if content is None or not self.isDiscussionAllowedFor(content):
             return ()


=== Products/CMFCore/WorkflowTool.py 1.46.2.6 => 1.46.2.7 ===
--- Products/CMFCore/WorkflowTool.py:1.46.2.6	Mon Jun 20 05:24:34 2005
+++ Products/CMFCore/WorkflowTool.py	Mon Jun 20 13:19:21 2005
@@ -24,7 +24,6 @@
 from Globals import PersistentMapping
 from OFS.Folder import Folder
 
-from ActionInformation import getOAI
 from ActionProviderBase import ActionProviderBase
 from interfaces.portal_workflow import portal_workflow as IWorkflowTool
 from permissions import ManagePortal
@@ -228,7 +227,7 @@
         o Global actions are supplied by all workflows.
         """
         if object is not None or info is None:
-            info = self._getOAI(self, object)
+            info = self._getOAI(object)
         chain = self.getChainFor(info.object)
         did = {}
         actions = []



More information about the CMF-checkins mailing list