summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-23 04:03:56 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2011-03-24 15:32:08 +0100
commitb6a34d013bd81c336312c09f55c417da1163b3f1 (patch)
tree1dac912cb8085693bed40f61208590404dd623cc
parent044393c44b64e822445a4193214d8aec17ef7a48 (diff)
downloadaur-b6a34d013bd81c336312c09f55c417da1163b3f1.tar.gz
aur-b6a34d013bd81c336312c09f55c417da1163b3f1.tar.xz
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>
-rw-r--r--web/lib/pkgfuncs.inc12
-rw-r--r--web/template/pkg_search_form.php2
2 files changed, 7 insertions, 7 deletions
diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc
index 03deea29..b38c7da5 100644
--- a/web/lib/pkgfuncs.inc
+++ b/web/lib/pkgfuncs.inc
@@ -419,13 +419,13 @@ function pkg_search_page($SID="") {
if (isset($_GET["PP"])) {
$_GET["PP"] = intval($_GET["PP"]);
- if ($_GET["PP"] < 25)
- $_GET["PP"] = 25;
- else if ($_GET["PP"] > 100)
- $_GET["PP"] = 100;
+ if ($_GET["PP"] < 50)
+ $_GET["PP"] = 50;
+ else if ($_GET["PP"] > 250)
+ $_GET["PP"] = 250;
}
else {
- $_GET["PP"] = 25;
+ $_GET["PP"] = 50;
}
// FIXME: pull out DB-related code. all of it.
@@ -560,7 +560,7 @@ function pkg_search_page($SID="") {
if ($total > 1 || $total == 0) {
# 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);
$pages = ceil($total / $per_page);
$templ_pages = array();
diff --git a/web/template/pkg_search_form.php b/web/template/pkg_search_form.php
index 896d47f7..e570dfbc 100644
--- a/web/template/pkg_search_form.php
+++ b/web/template/pkg_search_form.php
@@ -89,7 +89,7 @@
<label><?php print __("Per page"); ?></label>
<select name='PP'>
<?php
- $pages = array(25, 50, 75, 100);
+ $pages = array(50, 100, 250);
foreach ($pages as $i):
if (isset($_REQUEST['PP']) && $_REQUEST['PP'] == $i):
?>