From: Max Kanat-Alexander Date: Thu, 6 May 2010 02:15:34 +0000 (-0700) Subject: Bug 562551: Allow template-only extensions to work X-Git-Tag: bugzilla-3.6.1~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=967510b4b97e8b276607471e5d3e07c5775ce672;p=thirdparty%2Fbugzilla.git Bug 562551: Allow template-only extensions to work r=mkanat, a=mkanat (module owner) --- diff --git a/Bugzilla/Install/Util.pm b/Bugzilla/Install/Util.pm index 1e5c6b70a2..66658ff244 100644 --- a/Bugzilla/Install/Util.pm +++ b/Bugzilla/Install/Util.pm @@ -416,6 +416,18 @@ sub _template_base_directories { } } + # Extensions may also contain *only* templates, in which case they + # won't show up in extension_requirement_packages. + foreach my $path (_extension_paths()) { + next if !-d $path; + if (!-e "$path/Extension.pm" and !-e "$path/Config.pm" + and -d "$path/template") + { + push(@template_dirs, "$path/template"); + } + } + + push(@template_dirs, bz_locations()->{'templatedir'}); return \@template_dirs; }