From 3627c2f34d2d33edbeede7435452f12a560559db Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 22 Dec 2005 06:18:57 +0000 Subject: [PATCH] r660: Fixed PCV searching --- search.php | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/search.php b/search.php index a5b5d90..d908057 100644 --- a/search.php +++ b/search.php @@ -47,11 +47,7 @@ if (empty($_REQUEST['do'])) // ################################################################### if ($_REQUEST['do'] == 'process') -{ - // ------------------------------------------------------------------- - // parse out our product/component/version - $pcv = parse_pcv_select($bugsys->in['pcv_select']); - +{ // ------------------------------------------------------------------- // handle keywords if ($bugsys->in['summary']) @@ -111,9 +107,24 @@ if ($_REQUEST['do'] == 'process') // ------------------------------------------------------------------- // product/component/version stuff - if (is_array($bugsys->in['pcv'])) + if (is_array($bugsys->in['pcv_select'])) + { + foreach ($bugsys->in['pcv_select'] AS $pcv) + { + $pcv = parse_pcv_select($pcv, true); + $products[] = $pcv['product']; + $components[] = $pcv['component']; + $versions[] = $pcv['version']; + } + $querybuild['pcv'] = "AND bug.productid IN (" . implode(',', $products) . ") AND bug.componentid IN (" . implode(',', $components) . ") AND bug.versionid IN (" . implode(',', $versions) . ")"; + } + else { - $querybuild['pcv'] = "AND bug.productid = $pcv[product] AND bug.componentid = $pcv[component] AND bug.versionid = $pcv[version]"; + $pcv = parse_pcv_select($bugsys->in['pcv_select']); + if (is_array($pcv)) + { + $querybuild['pcv'] = "AND bug.productid = $pcv[product] AND bug.componentid = $pcv[component] AND bug.versionid = $pcv[version]"; + } } // ------------------------------------------------------------------- -- 2.43.5