From 68825ce5fa38d166501af2359520cfee6db7d7d6 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Tue, 20 Dec 2005 22:12:22 +0000 Subject: [PATCH] r638: Custom field searching now works right --- docs/beta-3-review.txt | 2 -- search.php | 10 +++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/docs/beta-3-review.txt b/docs/beta-3-review.txt index b4cf772..ff1b52c 100644 --- a/docs/beta-3-review.txt +++ b/docs/beta-3-review.txt @@ -2,6 +2,4 @@ - getting login page multiple times for admin [can't reproduce] -- search didn't work; I set new in my kewyord field; nothing happens - It would be great to have help customizable for the severity/priority/resolution/prod fields. Many people want 1 line descriptions for these. \ No newline at end of file diff --git a/search.php b/search.php index b07cd5d..a5b5d90 100644 --- a/search.php +++ b/search.php @@ -201,20 +201,20 @@ if ($_REQUEST['do'] == 'process') ); while ($field = $bugsys->db->fetch_array($fields_fetch)) { - if (!empty($bugsys->in['custom']["$field[fieldid]"]) OR ($field['type'] == 'select_single' AND isset($bugsys->in['custom']["$field[fieldid]"]))) + if (!empty($bugsys->in["field$field[fieldid]"]) OR ($field['type'] == 'select_single' AND isset($bugsys->in["field$field[fieldid]"]))) { if ($field['type'] == 'input_checkbox') { - $querybuild[] = "AND bugfieldvalue.field$field[fieldid] = " . (($bugsys->in['custom']["$field[fieldid]"] == 1) ? 0 : 1); + $querybuild[] = "AND bugfieldvalue.field$field[fieldid] = " . (($bugsys->in["field$field[fieldid]"] == 1) ? 0 : 1); } else if ($field['type'] == 'input_text') { - $querybuild[] = "AND bugfieldvalue.field$field[fieldid] LIKE '%" . $bugsys->in['custom']["$field[fieldid]"] . "%'"; + $querybuild[] = "AND bugfieldvalue.field$field[fieldid] LIKE '%" . $bugsys->in["field$field[fieldid]"] . "%'"; } - else if ($field['type'] == 'select_single' AND $bugsys->in['custom']["$field[fieldid]"] != -1) + else if ($field['type'] == 'select_single' AND $bugsys->in["field$field[fieldid]"] != -1) { $temp = unserialize($field['selects']); - $querybuild[] = "AND bugfieldvalue.field$field[fieldid] = '" . trim($temp[ intval($bugsys->in['custom']["$field[fieldid]"]) ]) . "'"; + $querybuild[] = "AND bugfieldvalue.field$field[fieldid] = '" . trim($temp[ intval($bugsys->in["field$field[fieldid]"]) ]) . "'"; } } } -- 2.43.5