From b60e501b05c49eb8187a2ce755d4263f132ecdb8 Mon Sep 17 00:00:00 2001 From: Vladimir Panteleev Date: Sun, 18 Mar 2018 06:56:59 +0200 Subject: Bug 1446236 - BugModal: Use TrackingFlags only when present --- extensions/BugModal/Extension.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'extensions') diff --git a/extensions/BugModal/Extension.pm b/extensions/BugModal/Extension.pm index 1291fca21..46ec20510 100644 --- a/extensions/BugModal/Extension.pm +++ b/extensions/BugModal/Extension.pm @@ -188,10 +188,13 @@ sub template_before_process { return if exists $bug->{error}; # trigger loading of tracking flags - Bugzilla::Extension::TrackingFlags->template_before_process({ - file => 'bug/edit.html.tmpl', - vars => $vars, - }); + state $have_tracking_flags = any { $_->NAME eq 'TrackingFlags' } @{ Bugzilla->extensions }; + if ($have_tracking_flags) { + Bugzilla::Extension::TrackingFlags->template_before_process({ + file => 'bug/edit.html.tmpl', + vars => $vars, + }); + } if (any { $bug->product eq $_ } READABLE_BUG_STATUS_PRODUCTS) { my @flags = map { { name => $_->name, status => $_->status } } @{$bug->flags}; -- cgit v1.2.3-24-g4f1b