summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--web/lib/pkgfuncs.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc
index 4c21702b..0b451cef 100644
--- a/web/lib/pkgfuncs.inc
+++ b/web/lib/pkgfuncs.inc
@@ -488,7 +488,11 @@ function pkg_search_page($SID="") {
$has_where = 1;
if (intval($_REQUEST["L"])) {
- $q.= "WHERE LocationID = ".intval($_REQUEST["L"])." ";
+ if (!$has_where) {
+ $q.= "WHERE LocationID = ".intval($_REQUEST["L"])." ";
+ } else {
+ $q .= "AND LocationID = ".intval($_REQUEST["L"])." ";
+ }
$has_where = 1;
}
if (intval($_REQUEST["C"])) {