Installer: properly override default $wgLogo value
authorKevin Israel <pleasestand@live.com>
Wed, 25 Sep 2013 06:48:05 +0000 (02:48 -0400)
committerJuneHyeon Bae <devunt@gmail.com>
Mon, 17 Mar 2014 23:34:06 +0000 (08:34 +0900)
Setup.php uses the value of $wgScriptPath in $wgLogo before the
installer determines the former, so it is necessary to override
the latter even before the WebInstaller_Options page is shown
(because it might never be shown).

Bug: 48084
Change-Id: Icc577c1bb1f78adc7a7cfb0581ae8ea2facba4cf

RELEASE-NOTES-1.23
includes/installer/Installer.php
includes/installer/WebInstallerPage.php

index 379b219..1fcb757 100644 (file)
@@ -168,6 +168,8 @@ production.
   no longer applies in such cases.
 * (bug 60960) Avoid doing file_exist() checks on data: URIs, as they cause
   warnings to be printed on Windows due to large path length.
+* (bug 48084) Fixed a bug in the installer that could cause $wgLogo to hold
+  the wrong path to the placeholder logo (skins/common/images/wiki.png).
 
 === Web API changes in 1.23 ===
 * (bug 54884) action=parse&prop=categories now indicates hidden and missing
index 55ca014..d667ae6 100644 (file)
@@ -170,7 +170,6 @@ abstract class Installer {
                'wgMetaNamespace',
                'wgDeletedDirectory',
                'wgEnableUploads',
-               'wgLogo',
                'wgShellLocale',
                'wgSecretKey',
                'wgUseInstantCommons',
@@ -211,6 +210,10 @@ abstract class Installer {
                '_MemCachedServers' => '',
                '_UpgradeKeySupplied' => false,
                '_ExistingDBSettings' => false,
+
+               // $wgLogo is probably wrong (bug 48084); set something that will work.
+               // Single quotes work fine here, as LocalSettingsGenerator outputs this unescaped.
+               'wgLogo' => '$wgStylePath/common/images/wiki.png',
        );
 
        /**
index 4bc6cad..3b50d8c 100644 (file)
@@ -969,10 +969,6 @@ class WebInstaller_Options extends WebInstallerPage {
                                $this->getVar( 'wgDeletedDirectory' )
                        )
                );
-               // If we're using the default, let the user set it relative to $wgScriptPath
-               $curLogo = $this->getVar( 'wgLogo' );
-               $logoString = ( $curLogo == "/wiki/skins/common/images/wiki.png" ) ?
-                       '$wgStylePath/common/images/wiki.png' : $curLogo;
 
                $uploadwrapperStyle = $this->getVar( 'wgEnableUploads' ) ? '' : 'display: none';
                $this->addHTML(
@@ -994,7 +990,6 @@ class WebInstaller_Options extends WebInstallerPage {
                        '</div>' .
                        $this->parent->getTextBox( array(
                                'var' => 'wgLogo',
-                               'value' => $logoString,
                                'label' => 'config-logo',
                                'attribs' => array( 'dir' => 'ltr' ),
                                'help' => $this->parent->getHelpBox( 'config-logo-help' )