[Zope-Checkins] SVN: Zope/trunk/ - Forward port fix for Collector
#1781 from Zope 2.7 branch.
Tres Seaver
tseaver at palladion.com
Sat May 21 23:34:13 EDT 2005
Log message for revision 30474:
- Forward port fix for Collector #1781 from Zope 2.7 branch.
Changed:
U Zope/trunk/doc/CHANGES.txt
U Zope/trunk/lib/python/Products/ZODBMountPoint/MountedObject.py
-=-
Modified: Zope/trunk/doc/CHANGES.txt
===================================================================
--- Zope/trunk/doc/CHANGES.txt 2005-05-20 20:39:23 UTC (rev 30473)
+++ Zope/trunk/doc/CHANGES.txt 2005-05-22 03:33:43 UTC (rev 30474)
@@ -27,12 +27,15 @@
Features added
+ - Made WebDAV server distinguishable from the default HTTP
+ server both in the ZMI and in event.log.
+
- Included BTreeFolder2
Bugs fixed
- - Made WebDAV server distinguishable from the default HTTP
- server both in the ZMI and in event.log.
+ - Collector #1781: made 'create_mount_points' ZConfig option actually
+ work (thanks to Dieter Maurer for the patch).
- Collector #1780: DateTime.strftime() now handles dates <= 1900 or
>= 2038
Modified: Zope/trunk/lib/python/Products/ZODBMountPoint/MountedObject.py
===================================================================
--- Zope/trunk/lib/python/Products/ZODBMountPoint/MountedObject.py 2005-05-20 20:39:23 UTC (rev 30473)
+++ Zope/trunk/lib/python/Products/ZODBMountPoint/MountedObject.py 2005-05-22 03:33:43 UTC (rev 30474)
@@ -117,7 +117,9 @@
'''
meta_type = 'ZODB Mount Point'
_isMountedObject = 1
- _create_mount_points = 0
+ # DM 2005-05-17: default value change necessary after fix of '_create_mount_point' handling
+ #_create_mount_points = 0
+ _create_mount_points = True
icon = 'p_/broken'
manage_options = ({'label':'Traceback', 'action':'manage_traceback'},)
@@ -167,7 +169,9 @@
try:
obj = root[real_root]
except KeyError:
- if container_class or self._create_mount_points:
+ # DM 2005-05-17: why should we require 'container_class'?
+ #if container_class or self._create_mount_points:
+ if self._create_mount_points:
# Create a database automatically.
from OFS.Application import Application
obj = Application()
@@ -183,7 +187,10 @@
try:
obj = obj.unrestrictedTraverse(real_path)
except (KeyError, AttributeError):
- if container_class or self._create_mount_points:
+ # DM 2005-05-13: obviously, we do not want automatic
+ # construction when "_create_mount_points" is false
+ #if container_class or self._create_mount_points:
+ if container_class and self._create_mount_points:
blazer = CustomTrailblazer(obj, container_class)
obj = blazer.traverseOrConstruct(real_path)
else:
@@ -272,7 +279,10 @@
return res
-def manage_addMounts(dispatcher, paths=(), create_mount_points=0,
+# DM 2005-05-17: change default for 'create_mount_points' as
+# otherwise (after our fix) 'temp_folder' can no longer be mounted
+#def manage_addMounts(dispatcher, paths=(), create_mount_points=0,
+def manage_addMounts(dispatcher, paths=(), create_mount_points=True,
REQUEST=None):
"""Adds MountedObjects at the requested paths.
"""
@@ -295,7 +305,9 @@
faux.id = mo.id
faux.meta_type = loaded.meta_type
container._setObject(faux.id, faux)
- del mo._create_mount_points
+ # DM 2005-05-17: we want to keep our decision about automatic
+ # mount point creation
+ #del mo._create_mount_points
container._setOb(faux.id, mo)
setMountPoint(container, faux.id, mo)
count += 1
More information about the Zope-Checkins
mailing list