]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 562551: Allow template-only extensions to work
authorMax Kanat-Alexander <mkanat@bugzilla.org>
Thu, 6 May 2010 02:14:04 +0000 (19:14 -0700)
committerMax Kanat-Alexander <mkanat@bugzilla.org>
Thu, 6 May 2010 02:14:04 +0000 (19:14 -0700)
r=mkanat, a=mkanat (module owner)

Bugzilla/Install/Util.pm

index 7bafa9330087fb582bb69b3fe0f066be18c7fe14..7779f6bda660718bcbc135aa677d3ec72fd23ab6 100644 (file)
@@ -418,6 +418,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;
 }