summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpjmattal <pjmattal>2005-02-28 20:34:11 +0100
committerpjmattal <pjmattal>2005-02-28 20:34:11 +0100
commit93ac7cb91db74b6043f0aeb54a548f9a5560a15e (patch)
treea4b0eb5ae007f48cc5dfc701de73d18791204888
parentac7e555b3416ecad62a37f8ffa98e7e8bbcf6c3d (diff)
downloadaur-93ac7cb91db74b6043f0aeb54a548f9a5560a15e.tar.gz
aur-93ac7cb91db74b6043f0aeb54a548f9a5560a15e.tar.xz
fixed bug #2285
needed a has_where clause before the LocationID parameter to the query builder
-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"])) {