[CMF-checkins] CVS: Products/CMFCore - ActionInformation.py:1.30

Tres Seaver tseaver at palladion.com
Sun Jun 26 07:10:39 EDT 2005


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

Modified Files:
	ActionInformation.py 
Log Message:
 - Forward-port fix for ActionInformation.setActionExpression from 1.5 branch.


=== Products/CMFCore/ActionInformation.py 1.29 => 1.30 ===
--- Products/CMFCore/ActionInformation.py:1.29	Fri Jun 24 12:09:00 2005
+++ Products/CMFCore/ActionInformation.py	Sun Jun 26 07:10:08 2005
@@ -381,7 +381,8 @@
         action = self._getActionObject()
         expr = action and action.text or ''
         if expr and isinstance(expr, basestring):
-            if not expr.startswith('string:') and not expr.startswith('python:'):
+            if ( not expr.startswith('string:')
+                 and not expr.startswith('python:') ):
                 expr = 'string:${object_url}/%s' % expr
                 self.action = Expression( expr )
         return expr
@@ -389,9 +390,10 @@
     security.declarePrivate( 'setActionExpression' )
     def setActionExpression(self, action):
         if action and isinstance(action, basestring):
-            if not action.startswith('string:') and not action.startswith('python:'):
+            if ( not action.startswith('string:')
+                 and not action.startswith('python:') ):
                 action = 'string:${object_url}/%s' % action
-                action = Expression( action )
+            action = Expression( action )
         self.action = action
 
     security.declarePublic( 'getCondition' )



More information about the CMF-checkins mailing list