no need to check SUPPORTS_WEBDAV_LOCKS manually. wl_isLocked() is defined and...

no need to check SUPPORTS_WEBDAV_LOCKS manually. wl_isLocked() is defined and defaults to false if SUPPORTS_WEBDAV_LOCKS is false

git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/portal_types@29484 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bcb915c3
......@@ -10,7 +10,7 @@ from AccessControl import ClassSecurityInfo
from AccessControl import getSecurityManager
from App.class_init import default__class_init__ as InitializeClass
from App.Common import package_home
from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate, SUPPORTS_WEBDAV_LOCKS
from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from BaseMailTemplate import BaseMailTemplate
......@@ -38,7 +38,7 @@ class MailTemplate(BaseMailTemplate,ZopePageTemplate):
security.declareProtected('Change Page Templates','pt_editAction')
def pt_editAction(self, REQUEST, mailhost, text, content_type, expand):
"""Change the mailhost and document."""
if SUPPORTS_WEBDAV_LOCKS and self.wl_isLocked():
if self.wl_isLocked():
raise ResourceLockedError, "File is locked via WebDAV"
self.expand=expand
self._setPropValue('mailhost',mailhost)
......
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