[Zope-CVS] CVS: Products/PageDesign - PageDesign.py:1.16
Casey Duncan
cvs-admin at zope.org
Thu Oct 30 14:34:18 EST 2003
Update of /cvs-repository/Products/PageDesign
In directory cvs.zope.org:/tmp/cvs-serv6744
Modified Files:
PageDesign.py
Log Message:
Allow relative paths to be used by references
=== Products/PageDesign/PageDesign.py 1.15 => 1.16 ===
--- Products/PageDesign/PageDesign.py:1.15 Tue Oct 28 18:04:03 2003
+++ Products/PageDesign/PageDesign.py Thu Oct 30 14:34:18 2003
@@ -189,13 +189,13 @@
"""Moves an element from one slot to another.
"""
# In the future: adapt source to IClipboardSource
- source = self.getPhysicalRoot().restrictedTraverse(source_path)
+ source = self.restrictedTraverse(source_path)
if not IClipboardSource.isImplementedBy(source):
raise DesignError, 'moveElement: bad or missing source_path'
getSecurityManager().validate(source, source, 'cut', source.cut)
# In the future: adapt target to IClipboardTarget
- target = self.getPhysicalRoot().restrictedTraverse(target_path)
+ target = self.restrictedTraverse(target_path)
if not IClipboardTarget.isImplementedBy(target):
raise DesignError, 'moveElement: bad or missing target_path'
getSecurityManager().validate(target, target,
@@ -213,7 +213,7 @@
"""Add elements to the page design."""
refs = []
for source_path in source_paths:
- source = self.getPhysicalRoot().restrictedTraverse(source_path)
+ source = self.restrictedTraverse(source_path)
# In the future: adapt source to IClipboardSource
# Also, use makeReference() (or "link()"?) instead of cut().
if IClipboardSource.isImplementedBy(source):
@@ -224,7 +224,7 @@
else:
refs.append(ElementReference(source))
- target = self.getPhysicalRoot().restrictedTraverse(target_path)
+ target = self.restrictedTraverse(target_path)
# In the future: adapt target to IClipboardTarget
if not IClipboardTarget.isImplementedBy(target):
raise DesignError, 'moveElement: bad or missing target_path'
@@ -240,7 +240,7 @@
def removeElement(self, source_path, RESPONSE=None):
"""Removes an element.
"""
- source = self.getPhysicalRoot().restrictedTraverse(source_path)
+ source = self.restrictedTraverse(source_path)
# In the future: adapt source to IClipboardSource
if not IClipboardSource.isImplementedBy(source):
raise DesignError, 'removeElement: bad or missing source_path'
More information about the Zope-CVS
mailing list