}
}
+our $VERSION = '20170531.2';
+
use Bugzilla::Auth;
use Bugzilla::Auth::Persist::Cookie;
use Bugzilla::CGI;
checker => \&check_urlbase
},
- {
- name => 'bugzilla_version',
- type => 't',
- default => '',
- },
-
{
name => 'ssl_redirect',
type => 'b',
sub BUGZILLA_VERSION {
my $bugzilla_version = '4.2';
eval { require Bugzilla } || return $bugzilla_version;
- return Bugzilla->params->{bugzilla_version} || $bugzilla_version;
+ eval { Bugzilla->VERSION } || $bugzilla_version;
}
# A base link to the current REST Documentation. We place it here
# Function for retrieving global parameters.
'Param' => sub { return Bugzilla->params->{$_[0]}; },
+ 'bugzilla_version' => sub {
+ my $version = Bugzilla->VERSION;
+ if (my @ver = $version =~ /^(\d{4})(\d{2})(\d{2})\.(\d+)$/s) {
+ if ($ver[3] eq '1') {
+ return join('.', @ver[0,1,2]);
+ }
+ else {
+ return join('.', @ver);
+ }
+ }
+ else {
+ return $version;
+ }
+ },
+
json_encode => sub {
return encode_json($_[0]);
},
lib->import($dir, File::Spec->catdir($dir, "lib"), File::Spec->catdir($dir, qw(local lib perl5)));
}
-use ExtUtils::MakeMaker 6.55;
-use constant BUGZILLA_VERSION => $ENV{BUGZILLA_VERSION} // 42;
+use ExtUtils::MakeMaker 7.24;
use File::Basename;
use File::Spec;
WriteMakefile(
NAME => 'Bugzilla',
AUTHOR => q{Bugzilla Developers <developers@bugzilla.org>},
- VERSION => BUGZILLA_VERSION,
+ VERSION_FROM => 'Bugzilla.pm',
ABSTRACT => 'Bugzilla Bug Tracking System',
LICENSE => 'Mozilla_2_0',
MIN_PERL_VERSION => '5.10.1',
# our weak etag is based on the bugzilla version parameter (BMO customization) and the announcehtml
# if either change, the cache will be considered invalid.
my @etag_parts = (
- Bugzilla->params->{bugzilla_version},
+ Bugzilla->VERSION,
Bugzilla->params->{announcehtml},
Bugzilla->params->{createemailregexp},
);
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 <tt>yyyy.mm.dd</tt>",
-
sslbase => "The URL that is the common initial leading part of all HTTPS " _
"(SSL) $terms.Bugzilla URLs.",
[% PROCESS global/header.html.tmpl
title = "$terms.Bugzilla Main Page"
header = "Main Page"
- header_addl_info = "version " _ (Bugzilla.params.bugzilla_version || constants.BUGZILLA_VERSION)
+ header_addl_info = "version " _ bugzilla_version
style_urls = [ 'skins/standard/index.css' ]
no_yui = 1
%]