From 280c184398d4e4de9c00c96ee9dff1d7e6724615 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 7 Apr 2015 13:14:35 +0800 Subject: Bug 1146960: replace the version number on bmo with a build number --- Bugzilla/Config/Core.pm | 6 ++++++ Bugzilla/Constants.pm | 7 ++++++- skins/contrib/Mozilla-OpenSans/global.css | 2 +- skins/contrib/Mozilla/global.css | 2 +- template/en/default/admin/params/core.html.tmpl | 3 +++ template/en/default/index.html.tmpl | 4 ++-- 6 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Bugzilla/Config/Core.pm b/Bugzilla/Config/Core.pm index 1548dcd9c..3d6a00e70 100644 --- a/Bugzilla/Config/Core.pm +++ b/Bugzilla/Config/Core.pm @@ -45,6 +45,12 @@ use constant get_param_list => ( checker => \&check_urlbase }, + { + name => 'bugzilla_version', + type => 't', + default => '', + }, + { name => 'ssl_redirect', type => 'b', diff --git a/Bugzilla/Constants.pm b/Bugzilla/Constants.pm index ad507c2ca..5e4240853 100644 --- a/Bugzilla/Constants.pm +++ b/Bugzilla/Constants.pm @@ -222,7 +222,12 @@ use Memoize; # CONSTANTS # # Bugzilla version -use constant BUGZILLA_VERSION => "4.2.11+"; +# BMO: we don't map exactly to a specific bugzilla version, so override our +# reported version with a parameter. +sub BUGZILLA_VERSION { + require Bugzilla; + return Bugzilla->params->{bugzilla_version} || '4.2+'; +} # A base link to the current REST Documentation. We place it here # as it will need to be updated to whatever the current release is. diff --git a/skins/contrib/Mozilla-OpenSans/global.css b/skins/contrib/Mozilla-OpenSans/global.css index dc72bddd7..a6c82deb8 100644 --- a/skins/contrib/Mozilla-OpenSans/global.css +++ b/skins/contrib/Mozilla-OpenSans/global.css @@ -157,7 +157,7 @@ hr { visibility: hidden; } -#bugzilla_version { +#header #bugzilla_version { float: right; color: #888; padding: 5px 20px; diff --git a/skins/contrib/Mozilla/global.css b/skins/contrib/Mozilla/global.css index be5755e95..fd3288cc1 100644 --- a/skins/contrib/Mozilla/global.css +++ b/skins/contrib/Mozilla/global.css @@ -200,7 +200,7 @@ hr { visibility: hidden; } -#bugzilla_version { +#header #bugzilla_version { float: right; color: #888; padding: 5px 20px; diff --git a/template/en/default/admin/params/core.html.tmpl b/template/en/default/admin/params/core.html.tmpl index b1578f422..0f7a95139 100644 --- a/template/en/default/admin/params/core.html.tmpl +++ b/template/en/default/admin/params/core.html.tmpl @@ -28,6 +28,9 @@ urlbase => "The URL that is the common initial leading part of all $terms.Bugzilla " _ "URLs.", + bugzilla_version => "The visible version number of Bugzilla. This should be set to " _ + "the date when BMO was last updated, in the format yyyy.mm.dd", + sslbase => "The URL that is the common initial leading part of all HTTPS " _ "(SSL) $terms.Bugzilla URLs.", diff --git a/template/en/default/index.html.tmpl b/template/en/default/index.html.tmpl index fa2a4d126..ff019469a 100644 --- a/template/en/default/index.html.tmpl +++ b/template/en/default/index.html.tmpl @@ -28,11 +28,11 @@ [% PROCESS global/variables.none.tmpl %] - +[% USE Bugzilla %] [% PROCESS global/header.html.tmpl title = "$terms.Bugzilla Main Page" header = "Main Page" - header_addl_info = "version $constants.BUGZILLA_VERSION" + header_addl_info = "version " _ (Bugzilla.params.bugzilla_version || constants.BUGZILLA_VERSION) style_urls = [ 'skins/standard/index.css' ] %] -- cgit v1.2.3-24-g4f1b