[Zope3-checkins] CVS: Zope3/src/zope/app/publisher/browser -
resource.py:1.5.6.3
Jim Fulton
jim at zope.com
Fri Sep 12 15:16:03 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/publisher/browser
In directory cvs.zope.org:/tmp/cvs-serv13470/src/zope/app/publisher/browser
Modified Files:
Tag: parentgeddon-branch
resource.py
Log Message:
Can't have the tests passing, can we?
=== Zope3/src/zope/app/publisher/browser/resource.py 1.5.6.2 => 1.5.6.3 ===
--- Zope3/src/zope/app/publisher/browser/resource.py:1.5.6.2 Tue Sep 9 11:47:06 2003
+++ Zope3/src/zope/app/publisher/browser/resource.py Fri Sep 12 15:15:33 2003
@@ -20,6 +20,8 @@
from zope.app import zapi
from zope.app.location import Location
from zope.app.interfaces.services.service import ISite
+from zope.app.interfaces.traversing import IContainmentRoot
+
class Resource(Location):
@@ -32,7 +34,12 @@
name = name[12:]
site = self.__parent__
- while not ISite.isImplementedBy(site):
+ while 1:
+ if ISite.isImplementedBy(site):
+ break
+ if IContainmentRoot.isImplementedBy(site):
+ site = None
+ break
site = site.__parent__
url = str(zapi.getView(site, 'absolute_url', self.request))
More information about the Zope3-Checkins
mailing list