summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoui Chang <louipc.ist@gmail.com>2008-02-28 12:00:02 -0500
committerSimo Leone <simo@archlinux.org>2008-03-23 03:04:17 -0500
commitb1fe84d39702a0f613625c23dd6ff1d909ac6c68 (patch)
treed8f4bc9027179e0d9c8fb55d5a7fd0c284491595
parente64307d8d278ca5514b6f23aa97d51d3fe655736 (diff)
Fixed bug where search resets when browsing orphans
Signed-off-by: Loui Chang <louipc.ist@gmail.com> Signed-off-by: Simo Leone <simo@archlinux.org>
-rw-r--r--web/lib/pkgfuncs.inc9
1 files changed, 7 insertions, 2 deletions
diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc
index 9612c73..0b31618 100644
--- a/web/lib/pkgfuncs.inc
+++ b/web/lib/pkgfuncs.inc
@@ -631,7 +631,7 @@ function pkg_search_page($SID="") {
$_REQUEST["do_Orphans"] = 0;
$O = 0;
}
- if ($_REQUEST["do_Orphans"] && $_REQUEST["do_Orphans"] != 1) {
+ if (!empty($_REQUEST['do_Orphans']) && $_REQUEST['do_Orphans'] != 1) {
# reset the offset to zero if they hit Orphans
#
$_REQUEST["do_Search"] = 0;
@@ -1123,7 +1123,12 @@ function pkg_search_page($SID="") {
# RIGHT
print " <td align='right'>";
if (mysql_num_rows(db_query($qnext, $dbh))) {
- print "<a href='/packages.php?O=" . ($O + $PP) . "&L=".intval($_REQUEST["L"])."&C=".intval($_REQUEST["C"])."&K=$K&SB=$SB&SO=$SO&PP=$PP&SeB=".$_REQUEST["SeB"]."&do_MyPackages=".$_REQUEST["do_MyPackages"]."&do_Orphans=".$_REQUEST["do_Orphans"]."'>" . __("More") . "</a>";
+ print "<a href='/packages.php?O=" . ($O + $PP) .
+ "&L=".intval($_REQUEST["L"])."&C=".intval($_REQUEST["C"]) .
+ "&K=$K&SB=$SB&SO=$SO&PP=$PP&SeB=".$_REQUEST["SeB"] .
+ "&do_MyPackages=".$_REQUEST["do_MyPackages"] .
+ "&do_Orphans=".isset($_REQUEST["do_Orphans"])."'>" .
+ __("More") . "</a>";
}
print " </td>\n";
print " </tr>\n";