mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Do not redirect on single search results
The use of header() to redirect after previous output was a design flaw. Our only luck here was PHP's "output_buffering" config variable defaulting to 4096, which kind of hid the bug for a long time. Fixes FS#24580. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
5853097561
commit
0e9f8c0ff5
1 changed files with 25 additions and 32 deletions
|
@ -533,8 +533,6 @@ function pkg_search_page($SID="") {
|
||||||
$last = $_GET['PP'] + $_GET['O'];
|
$last = $_GET['PP'] + $_GET['O'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($total > 1 || $total == 0) {
|
|
||||||
# calculation of pagination links
|
# calculation of pagination links
|
||||||
$per_page = ($_GET['PP'] > 0) ? $_GET['PP'] : 50;
|
$per_page = ($_GET['PP'] > 0) ? $_GET['PP'] : 50;
|
||||||
$current = ceil($first / $per_page);
|
$current = ceil($first / $per_page);
|
||||||
|
@ -563,11 +561,6 @@ function pkg_search_page($SID="") {
|
||||||
|
|
||||||
include('pkg_search_form.php');
|
include('pkg_search_form.php');
|
||||||
include('pkg_search_results.php');
|
include('pkg_search_results.php');
|
||||||
}
|
|
||||||
else {
|
|
||||||
$pkgdetails = mysql_fetch_assoc($result);
|
|
||||||
header("Location: packages.php?ID={$pkgdetails['ID']}");
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue