summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r--Bugzilla/Template.pm19
1 files changed, 19 insertions, 0 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index 7efd3a16e..5c5aff574 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -34,11 +34,13 @@ use strict;
use Bugzilla::Config qw(:DEFAULT $templatedir $datadir);
use Bugzilla::Util;
use Bugzilla::User;
+use Bugzilla::Error;
# for time2str - replace by TT Date plugin??
use Date::Format ();
use base qw(Template);
+use vars qw($vars);
# Convert the constants in the Bugzilla::Constants module into a hash we can
# pass to the template object for reflection into its "constants" namespace
@@ -130,6 +132,23 @@ sub getTemplateIncludePath () {
@usedlanguages)];
}
+# Write the header for non yet templatized .cgi files.
+sub put_header {
+ my $self = shift;
+ ($vars->{'title'}, $vars->{'h1'}, $vars->{'h2'}) = (@_);
+
+ $self->process("global/header.html.tmpl", $vars)
+ || ThrowTemplateError($self->error());
+ $vars->{'header_done'} = 1;
+}
+
+# Write the footer for non yet templatized .cgi files.
+sub put_footer {
+ my $self = shift;
+ $self->process("global/footer.html.tmpl", $vars)
+ || ThrowTemplateError($self->error());
+}
+
###############################################################################
# Templatization Code