From 4f6b75a65628b0d86c760309dd81dd03f5c6d308 Mon Sep 17 00:00:00 2001 From: "gerv%gerv.net" <> Date: Thu, 26 Jun 2003 06:22:50 +0000 Subject: Bug 16009 - generic charting. Patch by gerv; r,a=justdave. --- Bugzilla/Template.pm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Bugzilla/Template.pm') diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index b83079861..6c3e2161a 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -121,6 +121,13 @@ $Template::Stash::LIST_OPS->{ containsany } = return 0; }; +# Allow us to still get the scalar if we use the list operation ".0" on it, +# as we often do for defaults in query.cgi and other places. +$Template::Stash::SCALAR_OPS->{ 0 } = + sub { + return $_[0]; + }; + # Add a "substr" method to the Template Toolkit's "scalar" object # that returns a substring of a string. $Template::Stash::SCALAR_OPS->{ substr } = -- cgit v1.2.3-24-g4f1b