From f325d07b6c6a739a29544fe4dfb429f29a263d85 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Sun, 24 May 2015 11:30:21 +0200 Subject: [PATCH] installer: Export wgResourceBasePath in LocalSettingsGenerator wgRightsIcon uses wgResourceBasePath in its value, therefore it must be exported first. Otherwise $wgResourceBasePath will still be null (as from DefaultSettings.php) and cause an incorrect value to be assigned. Also fix $wgLogo to use wgResourceBasePath instead of wgScriptPath, to match what Setup.php does already. Bug: T75031 Change-Id: I6f18895f3caa50871327eec108fc7d70c1077f1e --- includes/installer/Installer.php | 14 +++++++------- includes/installer/LocalSettingsGenerator.php | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index f9c885d6e6..5ae499dbaf 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -224,7 +224,7 @@ abstract class Installer { // $wgLogo is probably wrong (bug 48084); set something that will work. // Single quotes work fine here, as LocalSettingsGenerator outputs this unescaped. - 'wgLogo' => '$wgScriptPath/resources/assets/wiki.png', + 'wgLogo' => '$wgResourceBasePath/resources/assets/wiki.png', ); /** @@ -285,27 +285,27 @@ abstract class Installer { public $licenses = array( 'cc-by' => array( 'url' => 'https://creativecommons.org/licenses/by/3.0/', - 'icon' => '{$wgResourceBasePath}/resources/assets/licenses/cc-by.png', + 'icon' => '$wgResourceBasePath/resources/assets/licenses/cc-by.png', ), 'cc-by-sa' => array( 'url' => 'https://creativecommons.org/licenses/by-sa/3.0/', - 'icon' => '{$wgResourceBasePath}/resources/assets/licenses/cc-by-sa.png', + 'icon' => '$wgResourceBasePath/resources/assets/licenses/cc-by-sa.png', ), 'cc-by-nc-sa' => array( 'url' => 'https://creativecommons.org/licenses/by-nc-sa/3.0/', - 'icon' => '{$wgResourceBasePath}/resources/assets/licenses/cc-by-nc-sa.png', + 'icon' => '$wgResourceBasePath/resources/assets/licenses/cc-by-nc-sa.png', ), 'cc-0' => array( 'url' => 'https://creativecommons.org/publicdomain/zero/1.0/', - 'icon' => '{$wgResourceBasePath}/resources/assets/licenses/cc-0.png', + 'icon' => '$wgResourceBasePath/resources/assets/licenses/cc-0.png', ), 'pd' => array( 'url' => '', - 'icon' => '{$wgResourceBasePath}/resources/assets/licenses/public-domain.png', + 'icon' => '$wgResourceBasePath/resources/assets/licenses/public-domain.png', ), 'gfdl' => array( 'url' => 'https://www.gnu.org/copyleft/fdl.html', - 'icon' => '{$wgResourceBasePath}/resources/assets/licenses/gnu-fdl.png', + 'icon' => '$wgResourceBasePath/resources/assets/licenses/gnu-fdl.png', ), 'none' => array( 'url' => '', diff --git a/includes/installer/LocalSettingsGenerator.php b/includes/installer/LocalSettingsGenerator.php index 737c9969bd..162a7897e4 100644 --- a/includes/installer/LocalSettingsGenerator.php +++ b/includes/installer/LocalSettingsGenerator.php @@ -335,6 +335,7 @@ if ( !defined( 'MEDIAWIKI' ) ) { ${serverSetting} ## The relative URL path to the skins directory \$wgStylePath = \"\$wgScriptPath/skins\"; +\$wgResourceBasePath = \$wgScriptPath; ## The relative URL path to the logo. Make sure you change this from the default, ## or else you'll overwrite your logo when you upgrade! -- 2.20.1