diff options
author | Dylan William Hardison <dylan@hardison.net> | 2018-10-14 18:16:48 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-10-14 18:16:48 +0200 |
commit | 6367a26da4093a8379e370ef328e9507c98b2e7e (patch) | |
tree | 14c29aefed892abd5e9a53954019dc44242a9a7c /Bugzilla | |
parent | f64b0d503df0ea11b3ec26f452c581493f832233 (diff) | |
parent | 8f0d6063aa670f01ab1ac25d682589d1978c6e83 (diff) | |
download | bugzilla-6367a26da4093a8379e370ef328e9507c98b2e7e.tar.gz bugzilla-6367a26da4093a8379e370ef328e9507c98b2e7e.tar.xz |
Merge remote-tracking branch 'bmo/master'
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Install/Localconfig.pm | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Bugzilla/Install/Localconfig.pm b/Bugzilla/Install/Localconfig.pm index ac21a0cb7..6650eca27 100644 --- a/Bugzilla/Install/Localconfig.pm +++ b/Bugzilla/Install/Localconfig.pm @@ -164,6 +164,10 @@ use constant LOCALCONFIG_VARS => ( default => _migrate_param( "urlbase", "" ), }, { + name => 'canonical_urlbase', + default => '', + }, + { name => 'attachment_base', default => _migrate_param( "attachment_base", '' ), }, @@ -294,18 +298,14 @@ sub _read_localconfig_from_file { sub read_localconfig { my ($include_deprecated) = @_; + my $config = $ENV{LOCALCONFIG_ENV} + ? _read_localconfig_from_env() + : _read_localconfig_from_file($include_deprecated); - if ($ENV{LOCALCONFIG_ENV}) { - my $lc = _read_localconfig_from_env(); - if ( $lc->{urlbase} eq 'AUTOMATIC' ) { - $lc->{urlbase} = sprintf 'http://%s:%d/%s', hostname(), $ENV{PORT}, $ENV{BZ_QA_LEGACY_MODE} ? 'bmo/' : ''; - $ENV{BZ_BASE_URL} = sprintf 'http://%s:%d', hostname(), $ENV{PORT}; - } - return $lc; - } - else { - return _read_localconfig_from_file($include_deprecated); - } + # Use the site's URL as the default Canonical URL + $config->{canonical_urlbase} //= $config->{urlbase}; + + return $config; } # |