mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 09:43:03 +00:00
Changed next and previous buttons to only
display if there are next and previous pages bug #2686
This commit is contained in:
parent
d3eebd2058
commit
90eadf0252
1 changed files with 9 additions and 4 deletions
|
@ -675,6 +675,7 @@ function pkg_search_page($SID="") {
|
|||
$q.= "ORDER BY Name ASC, LocationID ASC, CategoryID DESC ";
|
||||
break;
|
||||
}
|
||||
$qnext = $q."LIMIT ".($O+$PP).", ".$PP; //next page's worth
|
||||
$q.= "LIMIT ".$O.", ".$PP;
|
||||
|
||||
$result = db_query($q, $dbh);
|
||||
|
@ -876,8 +877,10 @@ function pkg_search_page($SID="") {
|
|||
print " <table border='0' cellpadding='0' cellspacing='0' width='100%'>\n";
|
||||
print " <tr>\n";
|
||||
print " <td align='left'>";
|
||||
print " <input type='submit' class='button' name='do_Less'";
|
||||
print " value='<-- ".__("Less")."'>\n";
|
||||
if (($O-$PP) >= 0) {
|
||||
print " <input type='submit' class='button' name='do_Less'";
|
||||
print " value='<-- ".__("Less")."'>\n";
|
||||
}
|
||||
print " </td>\n";
|
||||
if ($SID) {
|
||||
print " <td align='center'><span class='f5'>\n";
|
||||
|
@ -886,8 +889,10 @@ function pkg_search_page($SID="") {
|
|||
print " </span></td>\n";
|
||||
}
|
||||
print " <td align='right'>";
|
||||
print " <input type='submit' class='button' name='do_More'";
|
||||
print " value='".__("More")." -->'>\n";
|
||||
if (mysql_num_rows(db_query($qnext, $dbh))) {
|
||||
print " <input type='submit' class='button' name='do_More'";
|
||||
print " value='".__("More")." -->'>\n";
|
||||
}
|
||||
print " </td>\n";
|
||||
print " </tr>\n";
|
||||
print " </table>\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue