[CMF-checkins] SVN: CMF/trunk/CMF - fixed wl_isLocked handling

Yvo Schubbe y.2007- at wcm-solutions.de
Sun Feb 4 09:54:50 EST 2007


Log message for revision 72361:
  - fixed wl_isLocked handling

Changed:
  U   CMF/trunk/CMFCore/PortalContent.py
  U   CMF/trunk/CMFDefault/formlib/form.py

-=-
Modified: CMF/trunk/CMFCore/PortalContent.py
===================================================================
--- CMF/trunk/CMFCore/PortalContent.py	2007-02-04 14:45:18 UTC (rev 72360)
+++ CMF/trunk/CMFCore/PortalContent.py	2007-02-04 14:54:50 UTC (rev 72361)
@@ -30,6 +30,7 @@
 from interfaces.Contentish import Contentish as z2IContentish
 from permissions import FTPAccess
 from permissions import View
+from utils import Message as _
 
 
 class PortalContent(DynamicType, CMFCatalogAware, SimpleItem):
@@ -72,11 +73,11 @@
     security.declareProtected(FTPAccess, 'manage_FTPlist')
 
     def failIfLocked(self):
+        """ Check if isLocked via webDav.
         """
-        Check if isLocked via webDav
-        """
         if self.wl_isLocked():
-            raise ResourceLockedError('This resource is locked via webDAV.')
+            raise ResourceLockedError(_(u'This resource is locked via '
+                                        u'webDAV.'))
         return 0
 
     #

Modified: CMF/trunk/CMFDefault/formlib/form.py
===================================================================
--- CMF/trunk/CMFDefault/formlib/form.py	2007-02-04 14:45:18 UTC (rev 72360)
+++ CMF/trunk/CMFDefault/formlib/form.py	2007-02-04 14:54:50 UTC (rev 72361)
@@ -124,8 +124,8 @@
 
     def handle_validate(self, action, data):
         if self.context.wl_isLocked():
-            self.status = _(u'This resource is locked via webDAV.')
-            return ()
+            return (_(u'This resource is locked via webDAV.'),)
+        return None
 
     def _handle_success(self, action, data):
         # normalize set and datetime



More information about the CMF-checkins mailing list