[Zope3-checkins] CVS: Zope3/src/zope/app/services -
service.py:1.30.6.2
Jim Fulton
cvs-admin at zope.org
Tue Nov 11 13:44:36 EST 2003
Update of /cvs-repository/Zope3/src/zope/app/services
In directory cvs.zope.org:/tmp/cvs-serv7953/src/zope/app/services
Modified Files:
Tag: adaptergeddon-branch
service.py
Log Message:
Added code to make sure that insertion of local sites between local
sites adjusts the various connections correctly.
=== Zope3/src/zope/app/services/service.py 1.30.6.1 => 1.30.6.2 ===
--- Zope3/src/zope/app/services/service.py:1.30.6.1 Tue Nov 11 12:27:53 2003
+++ Zope3/src/zope/app/services/service.py Tue Nov 11 13:44:05 2003
@@ -57,6 +57,7 @@
from zope.app.interfaces.traversing import IContainmentRoot
from zope.app.interfaces.services.service import ISite
+from zope.app.location import inside
class SiteManager(BTreeContainer,
PersistentModuleRegistry,
@@ -93,7 +94,20 @@
return
def addSubsite(self, sub):
- self.subSites += (sub, )
+
+ subsite = sub.__parent__
+
+ # Update any sites that are now in the subsite:
+ subsites = []
+ for s in self.subSites:
+ if inside(s, subsite):
+ s.next = sub
+ sub.addSubsite(s)
+ else:
+ subsites.append(s)
+
+ subsites.append(sub)
+ self.subSites = tuple(subsites)
def getServiceDefinitions(wrapped_self):
"See IServiceService"
More information about the Zope3-Checkins
mailing list