Changeset 4782

Show
Ignore:
Timestamp:
11/12/08 18:31:50 (2 months ago)
Author:
bobbysmith007
Message:

closes #4008 Made Billing page matching more precise

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • timingandestimationplugin/branches/trac0.10/timingandestimationplugin/webui.py

    r3785 r4782  
    4040    # INavigationContributor methods 
    4141    def get_active_navigation_item(self, req): 
    42         if re.search('/Billing', req.path_info): 
     42        val = re.search('/Billing$', req.path_info) 
     43        if val and val.start() == 0: 
    4344            return "Billing" 
    4445        else: 
     
    6869 
    6970    def match_request(self, req): 
    70         if re.search('/Billing', req.path_info): 
    71             return True 
    72         return None 
     71        val = re.search('/Billing$', req.path_info) 
     72        return val and val.start() == 0 
    7373 
    7474    def process_request(self, req): 
  • timingandestimationplugin/branches/trac0.11-Permissions/timingandestimationplugin/webui.py

    r4260 r4782  
    5151    # INavigationContributor methods 
    5252    def get_active_navigation_item(self, req): 
    53         if re.search('/Billing', req.path_info): 
     53        val = re.search('/Billing$', req.path_info) 
     54        if val and val.start() == 0: 
    5455            return "Billing" 
    5556        else: 
     
    7980 
    8081    def match_request(self, req): 
    81         return req.path_info.startswith('/Billing') 
     82        val = re.search('/Billing$', req.path_info) 
     83        return val and val.start() == 0 
    8284 
    8385    def process_request(self, req): 
  • timingandestimationplugin/branches/trac0.11/timingandestimationplugin/webui.py

    r3784 r4782  
    4646    # INavigationContributor methods 
    4747    def get_active_navigation_item(self, req): 
    48         if re.search('/Billing', req.path_info): 
     48        val = re.search('/Billing$', req.path_info) 
     49        if val and val.start() == 0: 
    4950            return "Billing" 
    5051        else: 
     
    7475 
    7576    def match_request(self, req): 
    76         return req.path_info.startswith('/Billing') 
     77        val = re.search('/Billing$', req.path_info) 
     78        return val and val.start() == 0 
    7779 
    7880    def process_request(self, req):