summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r--Bugzilla/Template.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index f94cb2e38..2e2ac4b08 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -79,6 +79,19 @@ sub _load_constants {
return \%constants;
}
+# Overload Template::Process in order to add a hook to allow additional
+# variables to be made available by an extension
+sub process {
+ my $self = shift;
+ my ($file, $vars) = @_;
+
+ Bugzilla::Hook::process("template-before_process",
+ { vars => $vars, file => $file,
+ template => $self });
+
+ return $self->SUPER::process(@_);
+}
+
# Returns the path to the templates based on the Accept-Language
# settings of the user and of the available languages
# If no Accept-Language is present it uses the defined default