]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 328186: checksetup.pl should display the version of Bugzilla - Patch by Rémi...
authorlpsolit%gmail.com <>
Mon, 3 Jul 2006 15:53:24 +0000 (15:53 +0000)
committerlpsolit%gmail.com <>
Mon, 3 Jul 2006 15:53:24 +0000 (15:53 +0000)
14 files changed:
Bugzilla/Config.pm
Bugzilla/Config/Common.pm
Bugzilla/Constants.pm
Bugzilla/Template.pm
Bugzilla/Update.pm
checksetup.pl
contrib/merge-users.pl
importxml.pl
template/en/default/bug/show.xml.tmpl
template/en/default/config.js.tmpl
template/en/default/config.rdf.tmpl
template/en/default/filterexceptions.pl
template/en/default/index.html.tmpl
template/en/default/list/list.ics.tmpl

index a1c4b1f2551fd429f97a13d0333124b8583d987b..0e0c9d4e266af41799aa82e2da84f49e335abb6a 100644 (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
index 416a8784961e29adc447c37fa2798271fd62fc9f..9fe648d01387102528fd84a0f9fb3b371f69d1cf 100644 (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 " .
index 0eeb9be664f1691ccf4c3b7aad7275dbc0c7f756..af1357a9928a0d23a51740da19d7cec062a58182 100644 (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
index 59cf02dc479affb96a37fe90371eb36a5e10e9de..2a6cb901d7b912d79e346ec82bfef80288d955a8 100644 (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());
index 1aef2bf17711431b98c0d78d0c36cc0caa6b2a50..31cb2cac06618c97c31ca97a333bbfabf52f0a4a 100644 (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') {
index 349ac0b461f91d9fb4c0858a8ee391c53bde9292..cde371641714735be1a6e424ba5fbb8577852669 100755 (executable)
@@ -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
 ###########################################################################
index c8537c661f30982e43f37706201c61bc715dc5b7..540b22fb95db7f72fdcc9a5de872cad0fba9fa8c 100644 (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"
 }
index 995238be1486f87bee9eed8818dac426fb9a8c90..059adb43780c4748091dd1ed21684103994b947f 100755 (executable)
@@ -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);
     }
index 1e35d8f36348d79bfde589c28ec7231693d0c4fb..a941ebc62c6a603d65a5f3429054dc17d86ab0e5 100644 (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 %]
index 00ba589830964eafd3735882853a872bf260bcf6..2427c8748a6733926919cf218d9ce385813f37d0 100644 (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 %]'
 };
 
index 4c1047f503d54afa032ef7744da968784fb61f3e..32e94cbcace15ed3f2a608b37797530e7e3e4056 100644 (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>
index eee3b896373c5a693f06de768b65e07bf8403dc9..14043a9bfd6cd834ec6d88c63b9ffbb825862e5b 100644 (file)
 ],
 
 'bug/show.xml.tmpl' => [
-  'VERSION', 
+  'constants.BUGZILLA_VERSION', 
   'a.id', 
   'field', 
 ],
index 053c03b92e028783d54a311b88838508734700d5..9e11e4af0f59d5a77f9531b7e58a7cc4d3732bda 100644 (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();'
 %]
index 6246cf7551defac6eb37a162b9c0dfcebf1eddd8..f857d30b6002b7ebcdd463a513f7e828ad6aab77 100644 (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 %]