From 67f264429d4420eeef49e2b53959b6699c138d27 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Sun, 1 Apr 2018 11:00:36 -0400 Subject: Fix AUTOMATIC-type urlbase --- Bugzilla/Install/Localconfig.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Bugzilla/Install') diff --git a/Bugzilla/Install/Localconfig.pm b/Bugzilla/Install/Localconfig.pm index 7a913358c..85092f23a 100644 --- a/Bugzilla/Install/Localconfig.pm +++ b/Bugzilla/Install/Localconfig.pm @@ -283,7 +283,12 @@ sub read_localconfig { my ($include_deprecated) = @_; if ($ENV{LOCALCONFIG_ENV}) { - return _read_localconfig_from_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); -- cgit v1.2.3-24-g4f1b