mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
This commit is contained in:
parent
789245077d
commit
9169c3a7ac
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue