Add required parameter to our changeSkin monkey-patch, with default for...

Add required parameter to our changeSkin monkey-patch, with default for backward compatibility (approved by jm)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29878 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent abf74c46
......@@ -121,7 +121,7 @@ def CMFCoreSkinnableSkinnableObjectManager___getattr__(self, name):
raise AttributeError, name
return superGetAttr(self, name)
def CMFCoreSkinnableSkinnableObjectManager_changeSkin(self, skinname):
def CMFCoreSkinnableSkinnableObjectManager_changeSkin(self, skinname, REQUEST=None):
'''
Change the current skin.
......@@ -138,6 +138,7 @@ def CMFCoreSkinnableSkinnableObjectManager_changeSkin(self, skinname):
skinname = sf.getDefaultSkin()
tid = get_ident()
SKINDATA[tid] = (skinname, {'portal_skins': None}, {})
if REQUEST is None:
REQUEST = getattr(self, 'REQUEST', None)
if REQUEST is not None:
REQUEST._hold(SkinDataCleanup(tid, SKINDATA[tid]))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment