Recopie du code à partir de fragment_importer.js pour prise en charge de la balise...
[Plinn.git] / patch.py
index fe60513..ebc324f 100644 (file)
--- a/patch.py
+++ b/patch.py
@@ -10,6 +10,7 @@ from Products.CMFCore.permissions import ListFolderContents, View, ViewManagemen
 
 from Products.CMFCore.PortalFolder import PortalFolder as CMFPortalFolder
 from Folder import PlinnFolder
+from utils import getCPInfo, popCP
 
 cmfPortalFolderSecurity = ClassSecurityInfo()
 
@@ -25,4 +26,15 @@ CMFPortalFolder.listCatalogedContents = PlinnFolder.listCatalogedContents.im_fun
 cmfPortalFolderSecurity.declareProtected(AddPortalContent, 'put_upload')
 CMFPortalFolder.put_upload = PlinnFolder.put_upload.im_func
 
-cmfPortalFolderSecurity.apply(CMFPortalFolder)
\ No newline at end of file
+cmfPortalFolderSecurity.declarePublic('getCPInfo')
+CMFPortalFolder.getCPInfo = getCPInfo
+
+cmfPortalFolderSecurity.declarePublic('getCP')
+CMFPortalFolder.popCP = popCP
+
+cmfPortalFolderSecurity.apply(CMFPortalFolder)
+
+
+from Products.CMFDefault.formlib.form import _EditFormMixin
+from patch_impl import _setRedirect
+_EditFormMixin._setRedirect = _setRedirect
\ No newline at end of file