summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-07-03 17:53:24 +0200
committerlpsolit%gmail.com <>2006-07-03 17:53:24 +0200
commit3d317ca092cec05ad9dcdd3815d74bedbd9f3412 (patch)
tree20e379143241aee23d4dc506623f302e68698613
parent1e087ef9416da23989f9134866586ea02df156da (diff)
downloadbugzilla-3d317ca092cec05ad9dcdd3815d74bedbd9f3412.tar.gz
bugzilla-3d317ca092cec05ad9dcdd3815d74bedbd9f3412.tar.xz
Bug 328186: checksetup.pl should display the version of Bugzilla - Patch by RĂ©mi Zara <remi_zara@mac.com> r=mkanat a=justdave
-rw-r--r--Bugzilla/Config.pm3
-rw-r--r--Bugzilla/Config/Common.pm2
-rw-r--r--Bugzilla/Constants.pm6
-rw-r--r--Bugzilla/Template.pm3
-rw-r--r--Bugzilla/Update.pm2
-rwxr-xr-xchecksetup.pl7
-rw-r--r--contrib/merge-users.pl3
-rwxr-xr-ximportxml.pl4
-rw-r--r--template/en/default/bug/show.xml.tmpl2
-rw-r--r--template/en/default/config.js.tmpl2
-rw-r--r--template/en/default/config.rdf.tmpl2
-rw-r--r--template/en/default/filterexceptions.pl2
-rw-r--r--template/en/default/index.html.tmpl2
-rw-r--r--template/en/default/list/list.ics.tmpl2
14 files changed, 25 insertions, 17 deletions
diff --git a/Bugzilla/Config.pm b/Bugzilla/Config.pm
index a1c4b1f25..0e0c9d4e2 100644
--- a/Bugzilla/Config.pm
+++ b/Bugzilla/Config.pm
@@ -52,9 +52,6 @@ our @parampanels = ();
);
Exporter::export_ok_tags('admin', 'db', 'localconfig', 'params');
-# Bugzilla version
-$Bugzilla::Config::VERSION = "2.23.1+";
-
use vars qw(@param_list);
# Data::Dumper is required as needed, below. The problem is that then when
diff --git a/Bugzilla/Config/Common.pm b/Bugzilla/Config/Common.pm
index 416a87849..9fe648d01 100644
--- a/Bugzilla/Config/Common.pm
+++ b/Bugzilla/Config/Common.pm
@@ -299,7 +299,7 @@ sub check_mail_delivery_method {
sub check_notification {
my $option = shift;
my @current_version =
- ($Bugzilla::Config::VERSION =~ m/^(\d+)\.(\d+)(?:(rc|\.)(\d+))?\+?$/);
+ (BUGZILLA_VERSION =~ m/^(\d+)\.(\d+)(?:(rc|\.)(\d+))?\+?$/);
if ($current_version[1] % 2 && $option eq 'stable_branch_release') {
return "You are currently running a development snapshot, and so your " .
"installation is not based on a branch. If you want to be notified " .
diff --git a/Bugzilla/Constants.pm b/Bugzilla/Constants.pm
index 0eeb9be66..af1357a99 100644
--- a/Bugzilla/Constants.pm
+++ b/Bugzilla/Constants.pm
@@ -33,6 +33,8 @@ use strict;
use base qw(Exporter);
@Bugzilla::Constants::EXPORT = qw(
+ BUGZILLA_VERSION
+
bz_locations
CONTROLMAPNA
CONTROLMAPSHOWN
@@ -110,6 +112,10 @@ use base qw(Exporter);
# CONSTANTS
#
+# Bugzilla version
+use constant BUGZILLA_VERSION => "2.23.1+";
+
+#
# ControlMap constants for group_control_map.
# membercontol:othercontrol => meaning
# Na:Na => Bugs in this product may not be restricted to this
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index 59cf02dc4..2a6cb901d 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -795,9 +795,6 @@ sub create {
Bugzilla::BugMail::Send($id, $mailrecipients);
},
- # Bugzilla version
- # This could be made a ref, or even a CONSTANT with TT2.08
- 'VERSION' => $Bugzilla::Config::VERSION ,
},
}) || die("Template creation failed: " . $class->error());
diff --git a/Bugzilla/Update.pm b/Bugzilla/Update.pm
index 1aef2bf17..31cb2cac0 100644
--- a/Bugzilla/Update.pm
+++ b/Bugzilla/Update.pm
@@ -76,7 +76,7 @@ sub get_notifications {
# On which branch is the current installation running?
my @current_version =
- ($Bugzilla::Config::VERSION =~ m/^(\d+)\.(\d+)(?:(rc|\.)(\d+))?\+?$/);
+ (BUGZILLA_VERSION =~ m/^(\d+)\.(\d+)(?:(rc|\.)(\d+))?\+?$/);
my @release;
if (Bugzilla->params->{'upgrade_notification'} eq 'development_snapshot') {
diff --git a/checksetup.pl b/checksetup.pl
index 349ac0b46..cde371641 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -161,6 +161,7 @@ sub help_page {
my $programname = $0;
$programname =~ s#^\./##;
print "$programname - checks your setup and updates your Bugzilla installation\n";
+ printf "Version: " . BUGZILLA_VERSION . " on perl %vd\n", $^V;
print "\nUsage: $programname [SCRIPT [--verbose]] [--check-modules|--help]\n";
print " [--no-templates]\n";
print "\n";
@@ -198,6 +199,12 @@ if ($ARGV[0] && ($ARGV[0] !~ /^-/)) {
}
###########################################################################
+# Display version information
+###########################################################################
+
+printf "\n*** This is Bugzilla " . BUGZILLA_VERSION . " on perl %vd ***\n", $^V unless $silent;
+
+###########################################################################
# Check required module
###########################################################################
diff --git a/contrib/merge-users.pl b/contrib/merge-users.pl
index c8537c661..540b22fb9 100644
--- a/contrib/merge-users.pl
+++ b/contrib/merge-users.pl
@@ -47,6 +47,7 @@ merge-users.pl - Merge two user accounts.
use lib qw(.);
use Bugzilla;
+use Bugzilla::Constants;
use Bugzilla::Config qw(:DEFAULT);
use Bugzilla::Util;
@@ -62,7 +63,7 @@ pod2usage(0) if $help;
# We require Bugzilla 2.20 or higher (including 2.22+).
-my $current_version = $Bugzilla::Config::VERSION;
+my $current_version = BUGZILLA_VERSION;
if ($current_version =~ /^2\.2[0123]/) {
print "OK, you are using Bugzilla $current_version\n"
}
diff --git a/importxml.pl b/importxml.pl
index 995238be1..059adb437 100755
--- a/importxml.pl
+++ b/importxml.pl
@@ -305,11 +305,11 @@ sub init() {
my $urlbase = $root->{'att'}->{'urlbase'};
my $xmlversion = $root->{'att'}->{'version'};
- if ($xmlversion ne $Bugzilla::Config::VERSION) {
+ if ($xmlversion ne BUGZILLA_VERSION) {
my $log = "Possible version conflict!\n";
$log .= " XML was exported from Bugzilla version $xmlversion\n";
$log .= " But this installation uses ";
- $log .= $Bugzilla::Config::VERSION . "\n";
+ $log .= BUGZILLA_VERSION . "\n";
Debug($log, OK_LEVEL);
push(@logs, $log);
}
diff --git a/template/en/default/bug/show.xml.tmpl b/template/en/default/bug/show.xml.tmpl
index 1e35d8f36..a941ebc62 100644
--- a/template/en/default/bug/show.xml.tmpl
+++ b/template/en/default/bug/show.xml.tmpl
@@ -24,7 +24,7 @@
<?xml version="1.0" [% IF Param('utf8') %]encoding="UTF-8" [% END %]standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "[% Param('urlbase') %]bugzilla.dtd">
-<bugzilla version="[% VERSION %]"
+<bugzilla version="[% constants.BUGZILLA_VERSION %]"
urlbase="[% Param('urlbase') %]"
maintainer="[% Param('maintainer') FILTER xml %]"
[% IF user.id %]
diff --git a/template/en/default/config.js.tmpl b/template/en/default/config.js.tmpl
index 00ba58983..2427c8748 100644
--- a/template/en/default/config.js.tmpl
+++ b/template/en/default/config.js.tmpl
@@ -27,7 +27,7 @@
// the global bugzilla url
var installation = {
base_url : '[% Param('urlbase') FILTER js %]',
- install_version : '[% VERSION FILTER js %]',
+ install_version : '[% constants.BUGZILLA_VERSION FILTER js %]',
maintainer : '[% Param('maintainer') FILTER js %]'
};
diff --git a/template/en/default/config.rdf.tmpl b/template/en/default/config.rdf.tmpl
index 4c1047f50..32e94cbca 100644
--- a/template/en/default/config.rdf.tmpl
+++ b/template/en/default/config.rdf.tmpl
@@ -28,7 +28,7 @@
xmlns:bz="http://www.bugzilla.org/rdf#">
<bz:installation rdf:about="[% Param('urlbase') FILTER html %]">
- <bz:install_version>[% VERSION FILTER html %]</bz:install_version>
+ <bz:install_version>[% constants.BUGZILLA_VERSION FILTER html %]</bz:install_version>
<bz:maintainer>[% Param('maintainer') FILTER html %]</bz:maintainer>
<bz:status>
diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl
index eee3b8963..14043a9bf 100644
--- a/template/en/default/filterexceptions.pl
+++ b/template/en/default/filterexceptions.pl
@@ -350,7 +350,7 @@
],
'bug/show.xml.tmpl' => [
- 'VERSION',
+ 'constants.BUGZILLA_VERSION',
'a.id',
'field',
],
diff --git a/template/en/default/index.html.tmpl b/template/en/default/index.html.tmpl
index 053c03b92..9e11e4af0 100644
--- a/template/en/default/index.html.tmpl
+++ b/template/en/default/index.html.tmpl
@@ -32,7 +32,7 @@
[% PROCESS global/header.html.tmpl
title = "$terms.Bugzilla Main Page"
h1 = "Main Page"
- h3 = "version $VERSION"
+ h3 = "version $constants.BUGZILLA_VERSION"
style_urls = [ 'skins/standard/index.css' ]
onload = 'document.forms[\'f\'].quicksearch.focus();'
%]
diff --git a/template/en/default/list/list.ics.tmpl b/template/en/default/list/list.ics.tmpl
index 6246cf755..f857d30b6 100644
--- a/template/en/default/list/list.ics.tmpl
+++ b/template/en/default/list/list.ics.tmpl
@@ -54,7 +54,7 @@ END:VTODO
END:VCALENDAR
[% BLOCK ics_prodid %]
- [% "-//Mozilla/Bugzilla $VERSION//EN" FILTER ics('PRODID') %]
+ [% "-//Mozilla/Bugzilla $constants.BUGZILLA_VERSION//EN" FILTER ics('PRODID') %]
[% END %]
[% BLOCK ics_uid %]