changeset 566: |
cdf7d0e4c136 |
parent 565: |
a370464b995b |
child 567: |
70759bee5aec |
author: |
uriel@vm41.cat-v.org |
date: |
Thu, 06 Aug 2009 02:20:58 +0200 |
files: |
bin/corehandlers.rc |
description: |
Fix bug where incorrect elements in the navigation sidebar were highlighted, thanks to arg for reporting this. |
1.1--- a/bin/corehandlers.rc Wed Aug 05 17:06:25 2009 +0200
1.2+++ b/bin/corehandlers.rc Thu Aug 06 02:20:58 2009 +0200
1.3@@ -26,7 +26,11 @@
1.4 path = $0 d
1.5 gsub(/[\-_]/, " ", bname)
1.6
1.7- if(index(ENVIRON["req_path"] "/", path) == 1)
1.8+ # To avoid false matches add trailing / even for plain files to act as delimiter
1.9+ pa = path
1.10+ gsub(/[^\/]$/, "&/", pa)
1.11+
1.12+ if(index(ENVIRON["req_path"] "/", pa) == 1)
1.13 print "<li><a href=\"" path "\" class=\"thisPage\">»<i> " bname "</i></a></li>"
1.14 else
1.15 print "<li><a href=\"" path "\">› " bname "</a></li>"