diff options
author | Kohei Yoshino <kohei.yoshino@gmail.com> | 2018-08-24 22:33:44 +0200 |
---|---|---|
committer | dklawren <dklawren@users.noreply.github.com> | 2018-08-24 22:33:44 +0200 |
commit | 8f0d6063aa670f01ab1ac25d682589d1978c6e83 (patch) | |
tree | cc3e02407551dacf8b52c69d8855c38ce2dc7f89 /Bugzilla/Install | |
parent | f7b415b0354a32f36d37366b19e90f3834a01a69 (diff) | |
download | bugzilla-8f0d6063aa670f01ab1ac25d682589d1978c6e83.tar.gz bugzilla-8f0d6063aa670f01ab1ac25d682589d1978c6e83.tar.xz |
Bug 1399721 - change canonical from bugzil.la to bugzilla.mozilla.org
Diffstat (limited to 'Bugzilla/Install')
-rw-r--r-- | Bugzilla/Install/Localconfig.pm | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/Bugzilla/Install/Localconfig.pm b/Bugzilla/Install/Localconfig.pm index e524535ac..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,13 +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}) { - return _read_localconfig_from_env(); - } - 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; } # |