From 2bd62bae996af13fb37263a6d15b348db1cb1fd6 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Thu, 10 Jul 2014 18:32:52 +0200 Subject: [PATCH] installer: Recompute wgStylePath etc. after setting wgScriptPath Bug: 67810 Change-Id: I95d02b41222d25fe216453c1d795475d4acdead5 --- includes/installer/Installer.php | 2 +- includes/installer/WebInstaller.php | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 8c8e7c83e2..015ac53d17 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -146,9 +146,9 @@ abstract class Installer { * @var array */ protected $envPreps = array( + 'envPrepExtension', 'envPrepServer', 'envPrepPath', - 'envPrepExtension', ); /** diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index 2a3c1c9add..f62470eec4 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -1136,7 +1136,16 @@ class WebInstaller extends Installer { } if ( $path !== false ) { $scriptPath = preg_replace( '{^(.*)/(mw-)?config.*$}', '$1', $path ); + $scriptExtension = $this->getVar( 'wgScriptExtension' ); + $this->setVar( 'wgScriptPath', "$scriptPath" ); + // Update variables set from Setup.php that are derived from wgScriptPath + $this->setVar( 'wgScript', "$scriptPath/index$scriptExtension" ); + $this->setVar( 'wgLoadScript', "$scriptPath/load$scriptExtension" ); + $this->setVar( 'wgStylePath', "$scriptPath/skins" ); + $this->setVar( 'wgLocalStylePath', "$scriptPath/skins" ); + $this->setVar( 'wgExtensionAssetsPath', "$scriptPath/extensions" ); + $this->setVar( 'wgUploadPath', "$scriptPath/images" ); } else { $this->showError( 'config-no-uri' ); -- 2.20.1