[Zope3-checkins] CVS: Zope3/src/zope/app/publisher/browser - globalbrowsermenuservice.py:1.26

Garrett Smith garrett at mojave-corp.com
Tue Sep 23 21:53:04 EDT 2003


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

Modified Files:
	globalbrowsermenuservice.py 
Log Message:
Fixed a bug that caused the menu service to consider actions with similar
names to be both selected. E.g. 'index.html' and 'foo_index.html' would
both be selected for the URL 'http://localhost/index.html'.

=== Zope3/src/zope/app/publisher/browser/globalbrowsermenuservice.py 1.25 => 1.26 ===
--- Zope3/src/zope/app/publisher/browser/globalbrowsermenuservice.py:1.25	Tue Sep  2 16:46:57 2003
+++ Zope3/src/zope/app/publisher/browser/globalbrowsermenuservice.py	Tue Sep 23 21:52:33 2003
@@ -127,11 +127,11 @@
             if action.startswith('@@'):
                 normalized_action = action[2:]
 
-            if request_url.endswith(action):
+            if request_url.endswith('/'+normalized_action):
                 selected='selected'
-            elif request_url.endswith('/'+normalized_action):
+            elif request_url.endswith('/++view++'+normalized_action):
                 selected='selected'
-            elif request_url.endswith('++view++'+normalized_action):
+            elif request_url.endswith('/@@'+normalized_action):
                 selected='selected'
             else:
                 selected=''




More information about the Zope3-Checkins mailing list