diff options
author | mkanat%bugzilla.org <> | 2009-08-06 15:14:47 +0000 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2009-08-06 15:14:47 +0000 |
commit | 360c780767308810e4f26010cb9feb84bde68fd2 (patch) | |
tree | 1584eb4b87b7d45abfde23108fbbf9651badedea /page.cgi | |
parent | Bug 508737: Allow Bugzilla::Template::get_bug_link to take a Bugzilla::Bug ob... (diff) | |
download | bugzilla-360c780767308810e4f26010cb9feb84bde68fd2.tar.gz bugzilla-360c780767308810e4f26010cb9feb84bde68fd2.tar.bz2 bugzilla-360c780767308810e4f26010cb9feb84bde68fd2.zip |
Bug 508199: A hook for page.cgi
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, a=mkanat
Diffstat (limited to 'page.cgi')
-rwxr-xr-x | page.cgi | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 { |