summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-06-27 08:14:42 +0200
committerDylan William Hardison <dylan@hardison.net>2017-07-07 00:19:20 +0200
commitcea1575495ba32f4eb2c96a424d974877614f7f9 (patch)
tree479dd3809189a7d2acb27403c5288a2d631fd070 /Bugzilla
parent54ae755585402c9e61fbf95618405d38b2d51051 (diff)
downloadbugzilla-cea1575495ba32f4eb2c96a424d974877614f7f9.tar.gz
bugzilla-cea1575495ba32f4eb2c96a424d974877614f7f9.tar.xz
re-add bugzilla_version tt function
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Template.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index d72feea67..663e467c6 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -876,6 +876,21 @@ sub create {
# Function for retrieving global parameters.
'Param' => sub { return Bugzilla->params->{$_[0]}; },
+ 'bugzilla_version' => sub {
+ my $version = Bugzilla->VERSION;
+ if (my @ver = $version =~ /^(\d{4})(\d{2})(\d{2})\.(\d+)$/s) {
+ if ($ver[3] eq '1') {
+ return join('.', @ver[0,1,2]);
+ }
+ else {
+ return join('.', @ver);
+ }
+ }
+ else {
+ return $version;
+ }
+ },
+
asset_file => sub {
return Bugzilla->asset_manager->asset_file($_[0]);
},