[CMF-checkins] CVS: Products/CMFCore - FSObject.py:1.22
Jens Vagelpohl
jens at dataflake.org
Wed May 4 16:52:19 EDT 2005
Update of /cvs-repository/Products/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv12024/CMFCore
Modified Files:
FSObject.py
Log Message:
- CMFCore.FSObject: Try to find and call the appropriate method to
determine the skins tool name instead of hardcoding "portal_skins".
(http://www.zope.org/Collectors/CMF/349)
=== Products/CMFCore/FSObject.py 1.21 => 1.22 ===
--- Products/CMFCore/FSObject.py:1.21 Wed May 4 15:52:13 2005
+++ Products/CMFCore/FSObject.py Wed May 4 16:52:19 2005
@@ -107,9 +107,15 @@
# The permission was invalid, never mind
pass
+ skins_tool_namegetter = getattr(self, 'getSkinsFolderName', None)
+ if skins_tool_namegetter is not None:
+ skins_tool_name = skins_tool_namegetter()
+ else:
+ skins_tool_name = 'portal_skins'
+
id = obj.getId()
fpath = tuple( folder_path.split('/') )
- portal_skins = getToolByName(self,'portal_skins')
+ portal_skins = getToolByName(self, skins_tool_name)
folder = portal_skins.restrictedTraverse(fpath)
if id in folder.objectIds():
# we cant catch the badrequest so
More information about the CMF-checkins
mailing list