From: Gergő Tisza Date: Tue, 20 Mar 2018 01:35:43 +0000 (-0700) Subject: Set WebInstaller session variables as globals X-Git-Tag: 1.31.0-rc.0~341^2 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=3b076177b4d862412d47cc7625d38c7c7c69acfe;p=lhc%2Fweb%2Fwiklou.git Set WebInstaller session variables as globals During the install process LocalSettings.php does not exist yet so globals simply take their values from DefaultSettings.php. The installer uses the correct settings directly for e.g. database operations, but this blows up when something tries to use MediaWikiServices which is hardcoded to work with globals. Make the installer update the globals to work around this. Bug: T187586 Change-Id: I042099c399bc58929e83178f61e6e6ca478a3ee6 --- diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index e0e54c845b..9d7e0514bb 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -155,6 +155,10 @@ class WebInstaller extends Installer { if ( isset( $session['settings'] ) ) { $this->settings = $session['settings'] + $this->settings; + // T187586 MediaWikiServices works with globals + foreach ( $this->settings as $key => $val ) { + $GLOBALS[$key] = $val; + } } $this->setupLanguage();