summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Search
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-06-20 05:15:17 +0200
committerlpsolit%gmail.com <>2006-06-20 05:15:17 +0200
commit2545c0950c4f0fde8f78b265217fa9f523eff7bf (patch)
tree5bb305644ad11da196c7613b82743e426e2fd337 /Bugzilla/Search
parentb687ddef9b6dfeec3d87b7ae211decbf21b6e9a9 (diff)
downloadbugzilla-2545c0950c4f0fde8f78b265217fa9f523eff7bf.tar.gz
bugzilla-2545c0950c4f0fde8f78b265217fa9f523eff7bf.tar.xz
Bug 304601: Bugzilla::Config's :locations exports need to be in their own module - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat for the main patch, r=myk for the patch about CGI.pm a=justdave
Bug 328637: Remove all legal_* versioncache arrays - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=justdave Bug 110503 - Eliminate versioncache
Diffstat (limited to 'Bugzilla/Search')
-rw-r--r--Bugzilla/Search/Quicksearch.pm17
1 files changed, 9 insertions, 8 deletions
diff --git a/Bugzilla/Search/Quicksearch.pm b/Bugzilla/Search/Quicksearch.pm
index 69eaf8dcc..19bc6738c 100644
--- a/Bugzilla/Search/Quicksearch.pm
+++ b/Bugzilla/Search/Quicksearch.pm
@@ -28,6 +28,7 @@ use Bugzilla::Error;
use Bugzilla::Constants;
use Bugzilla::Keyword;
use Bugzilla::Bug;
+use Bugzilla::Field;
use base qw(Exporter);
@Bugzilla::Search::Quicksearch::EXPORT = qw(quicksearch);
@@ -144,8 +145,8 @@ sub quicksearch {
}
# It's no alias either, so it's a more complex query.
-
- &::GetVersionTable();
+ my $legal_statuses = get_legal_field_values('bug_status');
+ my $legal_resolutions = get_legal_field_values('resolution');
# Globally translate " AND ", " OR ", " NOT " to space, pipe, dash.
$searchstring =~ s/\s+AND\s+/ /g;
@@ -158,12 +159,12 @@ sub quicksearch {
my @closedStates;
my (%states, %resolutions);
- foreach (@::legal_bug_status) {
+ foreach (@$legal_statuses) {
push(@closedStates, $_) unless is_open_state($_);
}
foreach (@openStates) { $states{$_} = 1 }
if ($words[0] eq 'ALL') {
- foreach (@::legal_bug_status) { $states{$_} = 1 }
+ foreach (@$legal_statuses) { $states{$_} = 1 }
shift @words;
}
elsif ($words[0] eq 'OPEN') {
@@ -175,7 +176,7 @@ sub quicksearch {
\%resolutions,
[split(/,/, substr($words[0], 1))],
\@closedStates,
- \@::legal_resolution)) {
+ $legal_resolutions)) {
shift @words;
# Allowing additional resolutions means we need to keep
# the "no resolution" resolution.
@@ -191,8 +192,8 @@ sub quicksearch {
if (matchPrefixes(\%states,
\%resolutions,
[split(/,/, $words[0])],
- \@::legal_bug_status,
- \@::legal_resolution)) {
+ $legal_statuses,
+ $legal_resolutions)) {
shift @words;
}
else {
@@ -292,7 +293,7 @@ sub quicksearch {
}
# Severity
elsif (grep({lc($word) eq substr($_, 0, 3)}
- @::legal_severity)) {
+ @{get_legal_field_values('bug_severity')})) {
addChart('bug_severity', 'substring',
$word, $negate);
}