From 360c780767308810e4f26010cb9feb84bde68fd2 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Thu, 6 Aug 2009 15:14:47 +0000 Subject: Bug 508199: A hook for page.cgi Patch by Max Kanat-Alexander r=dkl, a=mkanat --- page.cgi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'page.cgi') diff --git a/page.cgi b/page.cgi index 290a4acb6..914ba3f22 100755 --- a/page.cgi +++ b/page.cgi @@ -34,6 +34,7 @@ use lib qw(. lib); use Bugzilla; use Bugzilla::Error; +use Bugzilla::Hook; Bugzilla->login(); @@ -50,13 +51,17 @@ if ($id) { ThrowCodeError("bad_page_cgi_id", { "page_id" => $id }); } + my %vars; + Bugzilla::Hook::process('page-before_template', + { page_id => $id, vars => \%vars }); + my $format = $template->get_format("pages/$1", undef, $2); $cgi->param('id', $id); print $cgi->header($format->{'ctype'}); - $template->process("$format->{'template'}") + $template->process("$format->{'template'}", \%vars) || ThrowTemplateError($template->error()); } else { -- cgit v1.2.3-24-g4f1b