Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
d9739be0
Commit
d9739be0
authored
May 22, 2005
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Forward port fix for Collector #1781 from Zope 2.7 branch.
parent
4e01d541
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
7 deletions
+22
-7
doc/CHANGES.txt
doc/CHANGES.txt
+5
-2
lib/python/Products/ZODBMountPoint/MountedObject.py
lib/python/Products/ZODBMountPoint/MountedObject.py
+17
-5
No files found.
doc/CHANGES.txt
View file @
d9739be0
...
@@ -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
...
...
lib/python/Products/ZODBMountPoint/MountedObject.py
View file @
d9739be0
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment