mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Bump up default per-page value to 50
25 is woefully small for the number of packages many searches can return, and with 28000+ packages in AUR, it makes sense to show a lot more per page by default. The new choices of (50, 100, 250) happen to match those from the main site. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
044393c44b
commit
b6a34d013b
2 changed files with 7 additions and 7 deletions
|
@ -419,13 +419,13 @@ function pkg_search_page($SID="") {
|
||||||
|
|
||||||
if (isset($_GET["PP"])) {
|
if (isset($_GET["PP"])) {
|
||||||
$_GET["PP"] = intval($_GET["PP"]);
|
$_GET["PP"] = intval($_GET["PP"]);
|
||||||
if ($_GET["PP"] < 25)
|
if ($_GET["PP"] < 50)
|
||||||
$_GET["PP"] = 25;
|
$_GET["PP"] = 50;
|
||||||
else if ($_GET["PP"] > 100)
|
else if ($_GET["PP"] > 250)
|
||||||
$_GET["PP"] = 100;
|
$_GET["PP"] = 250;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$_GET["PP"] = 25;
|
$_GET["PP"] = 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: pull out DB-related code. all of it.
|
// FIXME: pull out DB-related code. all of it.
|
||||||
|
@ -560,7 +560,7 @@ function pkg_search_page($SID="") {
|
||||||
|
|
||||||
if ($total > 1 || $total == 0) {
|
if ($total > 1 || $total == 0) {
|
||||||
# calculation of pagination links
|
# calculation of pagination links
|
||||||
$per_page = ($_GET['PP'] > 0) ? $_GET['PP'] : 25;
|
$per_page = ($_GET['PP'] > 0) ? $_GET['PP'] : 50;
|
||||||
$current = ceil($first / $per_page);
|
$current = ceil($first / $per_page);
|
||||||
$pages = ceil($total / $per_page);
|
$pages = ceil($total / $per_page);
|
||||||
$templ_pages = array();
|
$templ_pages = array();
|
||||||
|
|
|
@ -89,7 +89,7 @@
|
||||||
<label><?php print __("Per page"); ?></label>
|
<label><?php print __("Per page"); ?></label>
|
||||||
<select name='PP'>
|
<select name='PP'>
|
||||||
<?php
|
<?php
|
||||||
$pages = array(25, 50, 75, 100);
|
$pages = array(50, 100, 250);
|
||||||
foreach ($pages as $i):
|
foreach ($pages as $i):
|
||||||
if (isset($_REQUEST['PP']) && $_REQUEST['PP'] == $i):
|
if (isset($_REQUEST['PP']) && $_REQUEST['PP'] == $i):
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Add table
Reference in a new issue