[CMF-checkins] CVS: CMF/CMFSetup - actions.py:1.10.2.1

Yvo Schubbe y.2004_ at wcm-solutions.de
Wed Jul 21 11:47:13 EDT 2004


Update of /cvs-repository/CMF/CMFSetup
In directory cvs.zope.org:/tmp/cvs-serv31550/CMFSetup

Modified Files:
      Tag: yuppie-apb-redo-branch
	actions.py 
Log Message:
- removed (never released) OldstyleActionProviderBase again:
  ActionProviderBase now also works with oldstyle dicts
  and action providers that still need an OAI have to call getOAI()

- added ActionInfo, a lazy custom dict class that replaces the old Action info mappings

- listActionInfos() and listFilteredActionsFor() now return ActionInfo objects

- removed duplicate filtering in listFilteredActionsFor():
  it's now expensive and there should be no duplicates anyway

- made getMapping() faster


=== CMF/CMFSetup/actions.py 1.10 => 1.10.2.1 ===
--- CMF/CMFSetup/actions.py:1.10	Mon Jul 19 14:11:36 2004
+++ CMF/CMFSetup/actions.py	Wed Jul 21 11:47:12 2004
@@ -11,7 +11,6 @@
 
 from Products.CMFCore.ActionInformation import ActionInformation
 from Products.CMFCore.ActionProviderBase import IActionProvider
-from Products.CMFCore.ActionProviderBase import IOldstyleActionProvider
 from Products.CMFCore.utils import getToolByName
 
 from permissions import ManagePortal
@@ -151,10 +150,11 @@
             if not IActionProvider.isImplementedBy( provider ):
                 continue
 
-            if IOldstyleActionProvider.isImplementedBy( provider ):
+            actions = provider.listActions()
+
+            if actions and isinstance(actions[0], dict):
                 continue
 
-            actions = provider.listActions()
             provider_info['actions'] = [ ai.getMapping() for ai in actions ]
 
         return result



More information about the CMF-checkins mailing list