);
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
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 " .
use base qw(Exporter);
@Bugzilla::Constants::EXPORT = qw(
+ BUGZILLA_VERSION
+
bz_locations
CONTROLMAPNA
CONTROLMAPSHOWN
@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
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());
# 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') {
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";
$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
###########################################################################
use lib qw(.);
use Bugzilla;
+use Bugzilla::Constants;
use Bugzilla::Config qw(:DEFAULT);
use Bugzilla::Util;
# 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"
}
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);
}
<?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 %]
// 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 %]'
};
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>
],
'bug/show.xml.tmpl' => [
- 'VERSION',
+ 'constants.BUGZILLA_VERSION',
'a.id',
'field',
],
[% 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();'
%]
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 %]