mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 09:43:03 +00:00
Sync search result statistics with archweb
* Use archweb classes for search result statistics. * Add some space between page numbers. * Display current page number instead of current item range. * Hide page numbers if the result fits into a single page. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
7c004693f7
commit
4aad42d993
4 changed files with 14 additions and 13 deletions
|
@ -639,12 +639,6 @@ function pkg_search_page($SID="", $dbh=NULL) {
|
|||
// figure out the results to use
|
||||
$first = $_GET['O'] + 1;
|
||||
|
||||
if (($_GET['PP'] + $_GET['O']) > $total) {
|
||||
$last = $total;
|
||||
} else {
|
||||
$last = $_GET['PP'] + $_GET['O'];
|
||||
}
|
||||
|
||||
# calculation of pagination links
|
||||
$per_page = ($_GET['PP'] > 0) ? $_GET['PP'] : 50;
|
||||
$current = ceil($first / $per_page);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue