summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-04-01 17:00:36 +0200
committerDylan William Hardison <dylan@hardison.net>2018-04-01 17:00:36 +0200
commit67f264429d4420eeef49e2b53959b6699c138d27 (patch)
treed22af7370435bfdacd8234f29934edf93590de83 /Bugzilla/Install
parentab229b9a828b77f8a3b9ce215f0dfed4c84d4ae5 (diff)
downloadbugzilla-67f264429d4420eeef49e2b53959b6699c138d27.tar.gz
bugzilla-67f264429d4420eeef49e2b53959b6699c138d27.tar.xz
Fix AUTOMATIC-type urlbase
Diffstat (limited to 'Bugzilla/Install')
-rw-r--r--Bugzilla/Install/Localconfig.pm7
1 files changed, 6 insertions, 1 deletions
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);