Bug 328186: checksetup.pl should display the version of Bugzilla - Patch by R�mi Zara <remi_zara@mac.com> r=mkanat a=justdave

This commit is contained in:
lpsolit%gmail.com 2006-07-03 08:53:27 +00:00
parent 17081d4ed2
commit 5179c9b8c2
14 changed files with 25 additions and 17 deletions

View File

@ -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

View File

@ -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 " .

View File

@ -33,6 +33,8 @@ use strict;
use base qw(Exporter);
@Bugzilla::Constants::EXPORT = qw(
BUGZILLA_VERSION
bz_locations
CONTROLMAPNA
CONTROLMAPSHOWN
@ -109,6 +111,10 @@ use base qw(Exporter);
@Bugzilla::Constants::EXPORT_OK = qw(contenttypes);
# CONSTANTS
#
# Bugzilla version
use constant BUGZILLA_VERSION => "2.23.1+";
#
# ControlMap constants for group_control_map.
# membercontol:othercontrol => meaning

View File

@ -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());

View File

@ -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') {

View File

@ -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";
@ -197,6 +198,12 @@ if ($ARGV[0] && ($ARGV[0] !~ /^-/)) {
$silent = !grep(/^--no-silent$/, @ARGV) && !grep(/^--verbose$/, @ARGV);
}
###########################################################################
# Display version information
###########################################################################
printf "\n*** This is Bugzilla " . BUGZILLA_VERSION . " on perl %vd ***\n", $^V unless $silent;
###########################################################################
# Check required module
###########################################################################

View File

@ -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"
}

View File

@ -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);
}

View File

@ -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 %]

View File

@ -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 %]'
};

View File

@ -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>

View File

@ -350,7 +350,7 @@
],
'bug/show.xml.tmpl' => [
'VERSION',
'constants.BUGZILLA_VERSION',
'a.id',
'field',
],

View File

@ -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();'
%]

View File

@ -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 %]