installer: Export wgResourceBasePath in LocalSettingsGenerator
authorTimo Tijhof <krinklemail@gmail.com>
Sun, 24 May 2015 09:30:21 +0000 (11:30 +0200)
committerTimo Tijhof <krinklemail@gmail.com>
Sun, 24 May 2015 09:30:21 +0000 (11:30 +0200)
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
includes/installer/LocalSettingsGenerator.php

index f9c885d..5ae499d 100644 (file)
@@ -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' => '',
index 737c996..162a789 100644 (file)
@@ -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!