From b14a2dcfaacaed04d462db7b33dbc8d870b05be2 Mon Sep 17 00:00:00 2001 From: Kevin Israel Date: Wed, 25 Sep 2013 02:48:05 -0400 Subject: [PATCH] Installer: properly override default $wgLogo value 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 | 2 ++ includes/installer/Installer.php | 5 ++++- includes/installer/WebInstallerPage.php | 5 ----- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23 index 379b21973f..1fcb757b18 100644 --- a/RELEASE-NOTES-1.23 +++ b/RELEASE-NOTES-1.23 @@ -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 diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 55ca0140e8..d667ae615f 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -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', ); /** diff --git a/includes/installer/WebInstallerPage.php b/includes/installer/WebInstallerPage.php index 4bc6cad246..3b50d8c9c5 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -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 { '' . $this->parent->getTextBox( array( 'var' => 'wgLogo', - 'value' => $logoString, 'label' => 'config-logo', 'attribs' => array( 'dir' => 'ltr' ), 'help' => $this->parent->getHelpBox( 'config-logo-help' ) -- 2.20.1