From 8f0d6063aa670f01ab1ac25d682589d1978c6e83 Mon Sep 17 00:00:00 2001 From: Kohei Yoshino Date: Fri, 24 Aug 2018 16:33:44 -0400 Subject: Bug 1399721 - change canonical from bugzil.la to bugzilla.mozilla.org --- Bugzilla/Install/Localconfig.pm | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'Bugzilla/Install/Localconfig.pm') 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 @@ -163,6 +163,10 @@ use constant LOCALCONFIG_VARS => ( name => 'urlbase', 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; } # -- cgit v1.2.3-24-g4f1b