[z3-checkins] r8333 - z3/CMFonFive/branch/regebro-action_menus

regebro at codespeak.net regebro at codespeak.net
Mon Jan 17 16:14:40 MET 2005


Author: regebro
Date: Mon Jan 17 16:14:40 2005
New Revision: 8333

Modified:
   z3/CMFonFive/branch/regebro-action_menus/fiveactionstool.py
Log:
Adding support for calling listActions with object=None.


Modified: z3/CMFonFive/branch/regebro-action_menus/fiveactionstool.py
==============================================================================
--- z3/CMFonFive/branch/regebro-action_menus/fiveactionstool.py	(original)
+++ z3/CMFonFive/branch/regebro-action_menus/fiveactionstool.py	Mon Jan 17 16:14:40 2005
@@ -48,7 +48,11 @@
                 # The action needs a unique name, so I'll build one
                 # from the object_id and the action url. That is sure
                 # to be unique.
-                act['name'] = 'action_%s_%s' % (object.getId(), act['url'])
+                if object is None:
+                    act['name'] = 'action_%s' % (act['url'])
+                else:
+                    act['name'] = 'action_%s_%s' % (object.getId(), act['url'])
+
                 act['title'] = str(entry['title'])
                 actions.append(act)
         return actions or ()


More information about the z3-checkins mailing list