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