[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication/TraversalViews - AbsoluteURL.py:1.6.4.5

Christian Theune ct@gocept.com
Mon, 25 Nov 2002 01:47:43 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/ZopePublication/TraversalViews
In directory cvs.zope.org:/tmp/cvs-serv13954/Zope/App/ZopePublication/TraversalViews

Modified Files:
      Tag: ctheune-fix_appcontrol-branch
	AbsoluteURL.py 
Log Message:
SiteAbsoluteURL view extended for beeing usable as base for the ApplicationControllerAbsoluteURL view

=== Zope3/lib/python/Zope/App/ZopePublication/TraversalViews/AbsoluteURL.py 1.6.4.4 => 1.6.4.5 ===
--- Zope3/lib/python/Zope/App/ZopePublication/TraversalViews/AbsoluteURL.py:1.6.4.4	Sun Nov 24 12:33:28 2002
+++ Zope3/lib/python/Zope/App/ZopePublication/TraversalViews/AbsoluteURL.py	Mon Nov 25 01:47:42 2002
@@ -91,13 +91,13 @@
 
 class SiteAbsoluteURL(BrowserView):
 
-    name = ""
+    name = None
 
     def __str__(self):
         context = self.context
         dict = getInnerWrapperData(context)
         name = dict and dict.get('name') or None
-        if name != self.name:
+        if name and name != self.name:
             if name == '.':
                 name = dict.get('side_effect_name', name)
             container = getWrapperContainer(context)
@@ -112,7 +112,10 @@
         context = self.context
         dict = getInnerWrapperData(context)
         name = dict and dict.get('name') or None
-        if name != self.name:
+
+        # XXX Jim: Is this clean? We currently need this for 
+        #     the ApplicationControllerAbsoluteURL view.    - ctheune
+        if name and name != self.name:
             # The name is meaningless. There is a side-efect name
             # that we need to preserve in the urls (only)
             if name == '.':