[CMF-checkins] CVS: Products/CMFCore - FSObject.py:1.18.2.4

Jens Vagelpohl jens at dataflake.org
Wed May 4 16:51:40 EDT 2005


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

Modified Files:
      Tag: CMF-1_5-branch
	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.18.2.3 => 1.18.2.4 ===
--- Products/CMFCore/FSObject.py:1.18.2.3	Wed May  4 15:48:09 2005
+++ Products/CMFCore/FSObject.py	Wed May  4 16:51:40 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