Commit 111c169c authored by Brian Lloyd's avatar Brian Lloyd

Merged fix for bug 332.

parent 17f0a830
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
############################################################################## ##############################################################################
"""Property sheets""" """Property sheets"""
__version__='$Revision: 1.85 $'[11:-2]
__version__='$Revision: 1.86 $'[11:-2]
import time, App.Management, Globals import time, App.Management, Globals
from webdav.WriteLockInterface import WriteLockInterface from webdav.WriteLockInterface import WriteLockInterface
...@@ -26,6 +27,7 @@ from Globals import Persistent ...@@ -26,6 +27,7 @@ from Globals import Persistent
from Traversable import Traversable from Traversable import Traversable
from Acquisition import aq_base from Acquisition import aq_base
from AccessControl import getSecurityManager from AccessControl import getSecurityManager
from webdav.common import isDavCollection
from cgi import escape from cgi import escape
class View(App.Management.Tabs, Base): class View(App.Management.Tabs, Base):
...@@ -120,8 +122,10 @@ class PropertySheet(Traversable, Persistent, Implicit): ...@@ -120,8 +122,10 @@ class PropertySheet(Traversable, Persistent, Implicit):
# space identifier. # space identifier.
if id in self.__reserved_ids: if id in self.__reserved_ids:
raise ValueError, "'%s' is a reserved Id (forbidden Ids are: %s) " % \ raise ValueError(
(id, self.__reserved_ids) "'%s' is a reserved Id (forbidden Ids are: %s) " % (
id, self.__reserved_ids
))
self.id=id self.id=id
self._md=md or {} self._md=md or {}
...@@ -514,7 +518,7 @@ class DAVProperties(Virtual, PropertySheet, View): ...@@ -514,7 +518,7 @@ class DAVProperties(Virtual, PropertySheet, View):
def dav__resourcetype(self): def dav__resourcetype(self):
vself=self.v_self() vself=self.v_self()
if (hasattr(vself, '__dav_collection__') or if (isDavCollection(vself) or
getattr(aq_base(vself), 'isAnObjectManager', None)): getattr(aq_base(vself), 'isAnObjectManager', None)):
return '<n:collection/>' return '<n:collection/>'
return '' return ''
......
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