From f786d42447d8515d5fb2fdd821c2635f95cbe1bf Mon Sep 17 00:00:00 2001 From: Vladimir Panteleev Date: Sun, 8 Apr 2018 19:08:19 +0300 Subject: Bug 1446236 - Fix instant search without GuidedBugEntry (#38) * instant-search.js: Don't fail if product map isn't loaded getProduct had a hard dependency on the 'products' object, which is provided by products.js from the GuidedBugEntry extension. Check if the products variable exists before attempting to use it. This can happen when loading products.js fails, which in turn can happen when the GuidedBugEntry extension isn't present. * Instant search: Don't load products.js without GuidedBugEntry Fixes a 404 if the GuidedBugEntry extension is not present. * instant-search.js: Use throbber.gif from core Fixes remaining dependency on GuidedBugEntry. --- Bugzilla/Template.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Bugzilla/Template.pm') diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index 3ace60cf8..20cdaa3ab 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -997,6 +997,8 @@ sub create { 'feature_enabled' => sub { return Bugzilla->feature(@_); }, + 'has_extension' => sub { return Bugzilla->has_extension(@_); }, + # field_descs can be somewhat slow to generate, so we generate # it only once per-language no matter how many times # $template->process() is called. -- cgit v1.2.3-24-g4f1b