summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Search.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Search.pm')
-rw-r--r--Bugzilla/Search.pm6
1 files changed, 2 insertions, 4 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index 643d591ca..e15c60f7f 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -34,7 +34,6 @@ use Date::Format;
use Date::Parse;
use Scalar::Util qw(blessed);
use List::MoreUtils qw(all firstidx part uniq);
-use List::Util qw(any);
use POSIX qw(INT_MAX);
use Storable qw(dclone);
use Time::HiRes qw(gettimeofday tv_interval);
@@ -803,8 +802,7 @@ sub data {
# BMO - to avoid massive amounts of joins, if we're selecting a lot of
# tracking flags, replace them with placeholders. the values will be
# retrieved later and injected into the result.
- state $have_tracking_flags = any { $_->NAME eq 'TrackingFlags' } @{ Bugzilla->extensions };
- if ($have_tracking_flags) {
+ if (Bugzilla->has_extension('TrackingFlags')) {
my %tf_map = map { $_ => 1 } Bugzilla::Extension::TrackingFlags::Flag->get_all_names();
my @tf_selected = grep { exists $tf_map{$_} } @orig_fields;
# mysql has a limit of 61 joins, and we want to avoid massive amounts of joins
@@ -867,7 +865,7 @@ sub data {
$self->{data} = [map { $data{$_} } @$bug_ids];
# BMO - get tracking flags values, and insert into result
- if ($have_tracking_flags && @{ $self->{tracking_flags} }) {
+ if (Bugzilla->has_extension('TrackingFlags') && @{ $self->{tracking_flags} }) {
# read values
my $values;
$sql = "