diff options
author | myk%mozilla.org <> | 2004-01-12 02:12:13 +0100 |
---|---|---|
committer | myk%mozilla.org <> | 2004-01-12 02:12:13 +0100 |
commit | 637b35d05add84f71adcf7d0d3cb060b1c3e7349 (patch) | |
tree | 68ac02c31b34b0883a71c20a473a88946302be09 /Bugzilla/Template.pm | |
parent | e4bdfbbf265b93bbb9efa5d987ddb1d9167df28d (diff) | |
download | bugzilla-637b35d05add84f71adcf7d0d3cb060b1c3e7349.tar.gz bugzilla-637b35d05add84f71adcf7d0d3cb060b1c3e7349.tar.xz |
Fix for bug 229658: Implements a mechanism for extensions to hook into standard Bugzilla templates so they can extend the Bugzilla UI without having to modify the standard templates themselves, making it easier to develop and use Bugzilla extensions.
r=bbaetz, gerv
a=myk
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r-- | Bugzilla/Template.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index d981c7a59..d370627d3 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -79,6 +79,7 @@ sub getTemplateIncludePath () { if (not ($languages =~ /,/)) { return $template_include_path = ["$templatedir/$languages/custom", + "$templatedir/$languages/extension", "$templatedir/$languages/default"]; } my @languages = sortAcceptLanguage($languages); @@ -97,6 +98,7 @@ sub getTemplateIncludePath () { push(@usedlanguages, Param('defaultlanguage')); return $template_include_path = [map(("$templatedir/$_/custom", + "$templatedir/$_/extension", "$templatedir/$_/default"), @usedlanguages)]; } @@ -185,6 +187,9 @@ sub create { COMPILE_DIR => "$datadir/template", + # Initialize templates (f.e. by loading plugins like Hook). + PRE_PROCESS => "global/initialize.none.tmpl", + # Functions for processing text within templates in various ways. # IMPORTANT! When adding a filter here that does not override a # built-in filter, please also add a stub filter to checksetup.pl |