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 <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2012-07-17 23:05:47 +02:00
parent 6790b36247
commit f2301ca922
2 changed files with 2 additions and 1 deletions

View file

@ -22,6 +22,7 @@ $PKG_PATH = '/packages';
function get_route($path) {
global $ROUTES;
$path = rtrim($path, '/');
if (isset($ROUTES[$path])) {
return $ROUTES[$path];
} else {