diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-04-05 17:45:21 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-04-05 17:45:21 +0200 |
commit | 206678dfb7b1e23b17fc1b4911174054cb24cca5 (patch) | |
tree | b0caf1a8f4a830b2f29c5460a7ef378f976a33d7 /web | |
parent | 724a73781539291e67b95cf89bc07b7a8193ecf1 (diff) | |
download | aur-206678dfb7b1e23b17fc1b4911174054cb24cca5.tar.gz aur-206678dfb7b1e23b17fc1b4911174054cb24cca5.tar.xz |
pkgbase.php: Append query string when redirecting
Add the query string when redirecting to the package details page. This
fixes the target of the "All comments" link of non-split packages.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web')
-rw-r--r-- | web/html/pkgbase.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/web/html/pkgbase.php b/web/html/pkgbase.php index 3369049e..0d1b74aa 100644 --- a/web/html/pkgbase.php +++ b/web/html/pkgbase.php @@ -118,7 +118,11 @@ if (check_token()) { $pkgs = pkgbase_get_pkgnames($base_id); if (count($pkgs) == 1) { /* Not a split package. Redirect to the package page. */ - header('Location: ' . get_pkg_uri($pkgs[0])); + if (empty($_SERVER['QUERY_STRING'])) { + header('Location: ' . get_pkg_uri($pkgs[0])); + } else { + header('Location: ' . get_pkg_uri($pkgs[0]) . '?' . $_SERVER['QUERY_STRING']); + } } $details = pkgbase_get_details($base_id); |