[CMF-checkins] CVS: CMF/CMFCore - ActionsTool.py:1.46

Yvo Schubbe y.2004_ at wcm-solutions.de
Fri Feb 6 05:12:17 EST 2004


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

Modified Files:
	ActionsTool.py 
Log Message:
we don't remove support for object actions


=== CMF/CMFCore/ActionsTool.py 1.45 => 1.46 ===
--- CMF/CMFCore/ActionsTool.py:1.45	Wed Feb  4 06:56:45 2004
+++ CMF/CMFCore/ActionsTool.py	Fri Feb  6 05:12:17 2004
@@ -169,22 +169,15 @@
                 actions.extend( provider.listActionInfos(object=object) )
             else:
                 # for Action Providers written for CMF versions before 1.5
-                warn('ActionProvider interface not up to date. In CMF 1.6 '
-                     'portal_actions will ignore listActions() of \'%s\'.'
-                     % provider_name,
-                     DeprecationWarning)
                 actions.extend( self._listActionInfos(provider, object) )
 
-        # for objects written for CMF versions before 1.5
         # Include actions from object.
         if object is not None:
             base = aq_base(object)
-            if hasattr(base, 'listActions'):
-                warn('Providing Actions by the object itself is deprecated. '
-                     'In CMF 1.6 portal_actions will ignore listActions() of '
-                     '\'%s\' if it is not registered as action provider.'
-                     % object.getId(),
-                     DeprecationWarning)
+            if hasattr(base, 'listActionInfos'):
+                actions.extend( object.listActionInfos(object=object) )
+            elif hasattr(base, 'listActions'):
+                # for objects written for CMF versions before 1.5
                 actions.extend( self._listActionInfos(object, object) )
 
         # Reorganize the actions by category.
@@ -218,6 +211,10 @@
     def _listActionInfos(self, provider, object):
         """ for Action Providers written for CMF versions before 1.5
         """
+        warn('ActionProvider interface not up to date. In CMF 1.6 '
+             'portal_actions will ignore listActions() of \'%s\'.'
+             % provider.getId(),
+             DeprecationWarning)
         info = getOAI(self, object)
         actions = provider.listActions(info)
 




More information about the CMF-checkins mailing list