From f2301ca922cd5088b7889a508f1ff9518f2f3a73 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 17 Jul 2012 23:05:47 +0200 Subject: routing.inc.php: rtrim() path in get_route() Return the correct route -- even if a "/" is appended to the URI. Signed-off-by: Lukas Fleischer --- web/lib/routing.inc.php | 1 + 1 file changed, 1 insertion(+) (limited to 'web/lib/routing.inc.php') diff --git a/web/lib/routing.inc.php b/web/lib/routing.inc.php index e8a2deb..bbcb9e2 100644 --- a/web/lib/routing.inc.php +++ b/web/lib/routing.inc.php @@ -22,6 +22,7 @@ $PKG_PATH = '/packages'; function get_route($path) { global $ROUTES; + $path = rtrim($path, '/'); if (isset($ROUTES[$path])) { return $ROUTES[$path]; } else { -- cgit v1.2.3-54-g00ecf