]> 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:15:34 +0000 (19:15 -0700)
committerMax Kanat-Alexander <mkanat@bugzilla.org>
Thu, 6 May 2010 02:15:34 +0000 (19:15 -0700)
r=mkanat, a=mkanat (module owner)

Bugzilla/Install/Util.pm

index 1e5c6b70a287770487f908cbb04288ac674f1924..66658ff244c322fea89002a45c58bf7204482ed9 100644 (file)
@@ -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;
 }