[Zope-CMF] [dev] a portal_skins issue
yuppie
y.2004_ at wcm-solutions.de
Thu Feb 5 06:03:13 EST 2004
Hi!
Working on the ActionsTool I stumbled over this issue:
The deprecation warning recently added for object actions shows that the
CMFSite root object has a listActions attribute. This is the listActions
method of portal_skins, added as part of the skin to the CMFSite name space.
Is there any good reason why all attributes of portal_skins itself are
added to the skin and this way to the root object?
Modifying SkinsContainer.getSkinByPath() seems to fix this. I attached
the patch. Does that approach look sane? Is there a better solution?
Any feedback is welcome.
Cheers,
Yuppie
Index: SkinsContainer.py
===================================================================
RCS file: /cvs-repository/CMF/CMFCore/SkinsContainer.py,v
retrieving revision 1.7
diff -u -r1.7 SkinsContainer.py
--- SkinsContainer.py 28 Nov 2003 14:52:00 -0000 1.7
+++ SkinsContainer.py 5 Feb 2004 10:56:09 -0000
@@ -56,7 +56,7 @@
"some/path, some/other/path, ..." The first part has precedence.
'''
baseself = aq_base(self)
- skinob = baseself
+ skinob = None
parts = list( path.split(',') )
parts.reverse()
for part_path in parts:
@@ -82,7 +82,11 @@
# Build the final skinob by creating an object
# that puts the former skinob in the context
# of the new skinob.
- skinob = partob.__of__(skinob)
+ partob = aq_base(partob)
+ if skinob is None:
+ skinob = partob
+ else:
+ skinob = partob.__of__(skinob)
return skinob
security.declarePrivate('getSkinByName')
More information about the Zope-CMF
mailing list