[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services - service.py:1.14

Albertas Agejevas alga@codeworks.lt
Wed, 19 Mar 2003 14:57:54 -0500


Update of /cvs-repository/Zope3/src/zope/app/browser/services
In directory cvs.zope.org:/tmp/cvs-serv11034/src/zope/app/browser/services

Modified Files:
	service.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/services/service.py 1.13 => 1.14 ===
--- Zope3/src/zope/app/browser/services/service.py:1.13	Tue Mar 18 16:02:20 2003
+++ Zope3/src/zope/app/browser/services/service.py	Wed Mar 19 14:57:22 2003
@@ -25,8 +25,7 @@
 from zope.app.services.service import ServiceConfiguration
 from zope.app.interfaces.services.configuration import IConfiguration
 from zope.app.form.utility import setUpWidgets, getWidgetsDataForContent
-from zope.app.traversing import traverse, getPhysicalPathString
-from zope.app.traversing import getPhysicalPath
+from zope.app.traversing import traverse, getPath
 from zope.app.interfaces.services.service import ILocalService
 from zope.proxy.context import getWrapperContainer
 from zope.app.interfaces.services.configuration \
@@ -82,7 +81,7 @@
         if not ILocalService.isImplementedBy(self.added_object):
             raise TypeError("%s is not a local service" % self.added_object)
 
-        url = getPhysicalPathString(self.added_object)
+        url = getPath(self.added_object)
         self.request.response.redirect(url + "/addConfiguration.html")
 
 
@@ -175,7 +174,7 @@
         return lst
 
     def action(self, name=[], active=[]):
-        path = getPhysicalPathString(self.context)
+        path = getPath(self.context)
         configure = traverse(getWrapperContainer(self.context), 'configure')
         container = getAdapter(configure, IZopeContainer)
 
@@ -234,11 +233,13 @@
         if not registry:
             return []
 
+        # XXX this code path is not being tested
         result = []
         for info in registry.info():
             configobj = info['configuration']
             component = configobj.getComponent()
-            path = getPhysicalPath(component)
+            path = getPath(component)
+            path = path.split("/")
             info['name'] = "/".join(path[-2:])
             info['url'] = str(getView(component, 'absolute_url', self.request))
             info['config'] = str(getView(configobj, 'absolute_url',