Commit d9739be0 authored by Tres Seaver's avatar Tres Seaver

- Forward port fix for Collector #1781 from Zope 2.7 branch.

parent 4e01d541
...@@ -27,12 +27,15 @@ Zope Changes ...@@ -27,12 +27,15 @@ Zope Changes
Features added Features added
- Made WebDAV server distinguishable from the default HTTP
server both in the ZMI and in event.log.
- Included BTreeFolder2 - Included BTreeFolder2
Bugs fixed Bugs fixed
- Made WebDAV server distinguishable from the default HTTP - Collector #1781: made 'create_mount_points' ZConfig option actually
server both in the ZMI and in event.log. work (thanks to Dieter Maurer for the patch).
- Collector #1780: DateTime.strftime() now handles dates <= 1900 or - Collector #1780: DateTime.strftime() now handles dates <= 1900 or
>= 2038 >= 2038
......
...@@ -117,7 +117,9 @@ class MountedObject(MountPoint, SimpleItem): ...@@ -117,7 +117,9 @@ class MountedObject(MountPoint, SimpleItem):
''' '''
meta_type = 'ZODB Mount Point' meta_type = 'ZODB Mount Point'
_isMountedObject = 1 _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' icon = 'p_/broken'
manage_options = ({'label':'Traceback', 'action':'manage_traceback'},) manage_options = ({'label':'Traceback', 'action':'manage_traceback'},)
...@@ -167,7 +169,9 @@ class MountedObject(MountPoint, SimpleItem): ...@@ -167,7 +169,9 @@ class MountedObject(MountPoint, SimpleItem):
try: try:
obj = root[real_root] obj = root[real_root]
except KeyError: 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. # Create a database automatically.
from OFS.Application import Application from OFS.Application import Application
obj = Application() obj = Application()
...@@ -183,7 +187,10 @@ class MountedObject(MountPoint, SimpleItem): ...@@ -183,7 +187,10 @@ class MountedObject(MountPoint, SimpleItem):
try: try:
obj = obj.unrestrictedTraverse(real_path) obj = obj.unrestrictedTraverse(real_path)
except (KeyError, AttributeError): 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) blazer = CustomTrailblazer(obj, container_class)
obj = blazer.traverseOrConstruct(real_path) obj = blazer.traverseOrConstruct(real_path)
else: else:
...@@ -272,7 +279,10 @@ def manage_getMountStatus(dispatcher): ...@@ -272,7 +279,10 @@ def manage_getMountStatus(dispatcher):
return res 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): REQUEST=None):
"""Adds MountedObjects at the requested paths. """Adds MountedObjects at the requested paths.
""" """
...@@ -295,7 +305,9 @@ def manage_addMounts(dispatcher, paths=(), create_mount_points=0, ...@@ -295,7 +305,9 @@ def manage_addMounts(dispatcher, paths=(), create_mount_points=0,
faux.id = mo.id faux.id = mo.id
faux.meta_type = loaded.meta_type faux.meta_type = loaded.meta_type
container._setObject(faux.id, faux) 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) container._setOb(faux.id, mo)
setMountPoint(container, faux.id, mo) setMountPoint(container, faux.id, mo)
count += 1 count += 1
......
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