[Zope3-checkins] CVS: Zope3/src/zope/app/browser/container - contents.py:1.13
Albertas Agejevas
alga@codeworks.lt
Wed, 19 Mar 2003 14:57:53 -0500
Update of /cvs-repository/Zope3/src/zope/app/browser/container
In directory cvs.zope.org:/tmp/cvs-serv11034/src/zope/app/browser/container
Modified Files:
contents.py
Log Message:
Renamed getPgysicalPathString() to getPath().
Got rid of getPhysicalPath() (which used to return a tuple) by replacing it
by getPath().
=== Zope3/src/zope/app/browser/container/contents.py 1.12 => 1.13 ===
--- Zope3/src/zope/app/browser/container/contents.py:1.12 Wed Mar 19 12:55:34 2003
+++ Zope3/src/zope/app/browser/container/contents.py Wed Mar 19 14:57:21 2003
@@ -25,7 +25,7 @@
import IPrincipalAnnotationService
from zope.publisher.browser import BrowserView
from zope.app.interfaces.traversing import IPhysicallyLocatable
-from zope.app.traversing import traverse, getRoot
+from zope.app.traversing import traverse, getRoot, getPath
from zope.app.interfaces.copypastemove import IPrincipalClipboard
from zope.app.interfaces.container import IPasteTarget
from zope.app.interfaces.copypastemove import IObjectCopier
@@ -86,8 +86,7 @@
def copyObjects(self, ids):
"""Copy objects specified in a list of object ids"""
- physical = getAdapter(self.context, IPhysicallyLocatable)
- container_path = physical.getPhysicalPath()
+ container_path = getPath(self.context)
user = self.request.user
annotationsvc = getService(self.context, 'PrincipalAnnotation')
@@ -96,15 +95,14 @@
clipboard.clearContents()
items = []
for id in ids:
- items.append('%s/%s' % ('/'.join(container_path), id))
+ items.append('%s/%s' % (container_path, id))
clipboard.addItems('copy', items)
self.request.response.redirect('@@contents.html')
def cutObjects(self, ids):
"""move objects specified in a list of object ids"""
- physical = getAdapter(self.context, IPhysicallyLocatable)
- container_path = physical.getPhysicalPath()
+ container_path = getPath(self.context)
user = self.request.user
annotationsvc = getService(self.context, 'PrincipalAnnotation')
@@ -113,7 +111,7 @@
clipboard.clearContents()
items = []
for id in ids:
- items.append('%s/%s' % ('/'.join(container_path), id))
+ items.append('%s/%s' % (container_path, id))
clipboard.addItems('cut', items)
self.request.response.redirect('@@contents.html')
@@ -123,8 +121,6 @@
move/copy operations"""
container = self.context
target = container
- physical = getAdapter(container, IPhysicallyLocatable)
- container_path = physical.getPhysicalPath()
user = self.request.user
annotationsvc = getService(self.context, 'PrincipalAnnotation')