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): ...@@ -121,7 +121,7 @@ def CMFCoreSkinnableSkinnableObjectManager___getattr__(self, name):
raise AttributeError, name raise AttributeError, name
return superGetAttr(self, name) return superGetAttr(self, name)
def CMFCoreSkinnableSkinnableObjectManager_changeSkin(self, skinname): def CMFCoreSkinnableSkinnableObjectManager_changeSkin(self, skinname, REQUEST=None):
''' '''
Change the current skin. Change the current skin.
...@@ -138,7 +138,8 @@ def CMFCoreSkinnableSkinnableObjectManager_changeSkin(self, skinname): ...@@ -138,7 +138,8 @@ def CMFCoreSkinnableSkinnableObjectManager_changeSkin(self, skinname):
skinname = sf.getDefaultSkin() skinname = sf.getDefaultSkin()
tid = get_ident() tid = get_ident()
SKINDATA[tid] = (skinname, {'portal_skins': None}, {}) SKINDATA[tid] = (skinname, {'portal_skins': None}, {})
REQUEST = getattr(self, 'REQUEST', None) if REQUEST is None:
REQUEST = getattr(self, 'REQUEST', None)
if REQUEST is not None: if REQUEST is not None:
REQUEST._hold(SkinDataCleanup(tid, SKINDATA[tid])) 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