summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-07-22 14:13:36 +0200
committerlpsolit%gmail.com <>2005-07-22 14:13:36 +0200
commite7d2b86c2765c3a8e853526683ceacdb260a7996 (patch)
tree90fc70fd199e7bfc5ae5656ceadafbe6c8afe4d7 /Bugzilla
parentd0303ab3ecb54eef2ed1b5e55839eada16748416 (diff)
downloadbugzilla-e7d2b86c2765c3a8e853526683ceacdb260a7996.tar.gz
bugzilla-e7d2b86c2765c3a8e853526683ceacdb260a7996.tar.xz
Bug 301507: Move PutHeader and PutFooter into Template.pm - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=justdave
Diffstat (limited to 'Bugzilla')
-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