summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2012-11-04 18:54:21 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2012-11-04 19:14:11 +0100
commit9169c3a7ac3f1def04ccc34b03b4b8f7a9e82208 (patch)
tree4240ba8fe9d2914ce349adeaeb7fb31bcc94cc50 /web
parent789245077d1ded7b2aaf4631bbca2a9267690739 (diff)
downloadaurweb-9169c3a7ac3f1def04ccc34b03b4b8f7a9e82208.tar.xz
routing.inc.php: Return proper (non-virtual) URIs
Make sure we always return root-relative URIs in get_pkg_uri() and in get_user_uri() and prepend a slash ("/") if the virtual URL feature is disabled. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web')
-rw-r--r--web/lib/routing.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/lib/routing.inc.php b/web/lib/routing.inc.php
index dfd6942..206886c 100644
--- a/web/lib/routing.inc.php
+++ b/web/lib/routing.inc.php
@@ -54,7 +54,7 @@ function get_pkg_uri($pkgname) {
if ($USE_VIRTUAL_URLS) {
return $PKG_PATH . '/' . urlencode($pkgname) . '/';
} else {
- return get_route($PKG_PATH) . '?N=' . urlencode($pkgname);
+ return '/' . get_route($PKG_PATH) . '?N=' . urlencode($pkgname);
}
}
@@ -70,6 +70,6 @@ function get_user_uri($username) {
if ($USE_VIRTUAL_URLS) {
return $USER_PATH . '/' . urlencode($username) . '/';
} else {
- return get_route($USER_PATH) . '?U=' . urlencode($username);
+ return '/' . get_route($USER_PATH) . '?U=' . urlencode($username);
}
}