diff options
author | Dylan William Hardison <dylan@hardison.net> | 2017-03-28 03:05:10 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2017-04-04 03:43:30 +0200 |
commit | 9f9e989704b5274afba6a1de0b7bdcc6e7296314 (patch) | |
tree | 01cc75a06bfb6cf60960fa72de90ad1084a6dfdb /Bugzilla | |
parent | 30c35b3aefc582e1bb123b309f9c4971c04094ee (diff) | |
download | bugzilla-9f9e989704b5274afba6a1de0b7bdcc6e7296314.tar.gz bugzilla-9f9e989704b5274afba6a1de0b7bdcc6e7296314.tar.xz |
Bug 1350909 - Make index.cgi cache-friendly for logged out requests
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Template.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index 2887f0138..1f0892a32 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -38,6 +38,7 @@ use File::Spec; use IO::Dir; use List::MoreUtils qw(firstidx); use Scalar::Util qw(blessed); +use JSON::XS qw(encode_json); use base qw(Template); @@ -976,6 +977,10 @@ sub create { # Function for retrieving global parameters. 'Param' => sub { return Bugzilla->params->{$_[0]}; }, + json_encode => sub { + return encode_json($_[0]); + }, + # Function to create date strings 'time2str' => \&Date::Format::time2str, |