summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-08-12 03:42:32 +0200
committermkanat%bugzilla.org <>2009-08-12 03:42:32 +0200
commitbf68d5918c2eea9b123ee36c7f3541cc1154e060 (patch)
treebb2dee504ca5a4e621a505b694284aa30f6c3866 /Bugzilla
parent73bb17590cf3f15166d20b028977d0c61a487b1e (diff)
downloadbugzilla-bf68d5918c2eea9b123ee36c7f3541cc1154e060.tar.gz
bugzilla-bf68d5918c2eea9b123ee36c7f3541cc1154e060.tar.xz
Bug 509108: Don't require a bug_list parameter to show the bug template (create the last_bug_list global template parameter)
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Template.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index 22ea4b7cc..d897cd946 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -756,7 +756,15 @@ sub create {
# Whether or not keywords are enabled, in this Bugzilla.
'use_keywords' => sub { return Bugzilla::Keyword->any_exist; },
-
+
+ 'last_bug_list' => sub {
+ my @bug_list;
+ my $cgi = Bugzilla->cgi;
+ if ($cgi->cookie("BUGLIST")) {
+ @bug_list = split(/:/, $cgi->cookie("BUGLIST"));
+ }
+ return \@bug_list;
+ },
# These don't work as normal constants.
DB_MODULE => \&Bugzilla::Constants::DB_MODULE,