[CMF-checkins] CVS: CMF - ActionsTool.py:1.8
shane@digicool.com
shane@digicool.com
Fri, 25 May 2001 13:37:53 -0400 (EDT)
Update of /cvs-repository/CMF/CMFCore
In directory korak.digicool.com:/tmp/cvs-serv21920
Modified Files:
ActionsTool.py
Log Message:
If action path is blank, don't include a trailing slash. (The old logic
was supposed to work this way but it didn't actually do it. :-)
--- Updated File ActionsTool.py in package CMF --
--- ActionsTool.py 2001/05/11 03:38:28 1.7
+++ ActionsTool.py 2001/05/25 17:37:53 1.8
@@ -201,10 +201,15 @@
if defs:
c_url = info.content_url
for d in defs:
+ a = d['action']
+ if a:
+ url = c_url + '/' + a
+ else:
+ url = c_url
actions.append({
'id': d.get('id', None),
'name': d['name'],
- 'url': join((c_url, d['action']), '/'),
+ 'url': url,
'permissions': d['permissions'],
'category': d.get('category', 'object'),
})
@@ -229,7 +234,7 @@
# This action requires no extra permissions.
verified = 1
else:
- if category == 'object' and object is not None:
+ if category in ('object', 'workflow') and object is not None:
context = object
elif category == 'folder' and folder is not None:
context = folder