MarkAHershberger has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/56917


Change subject: Installer can now customize the logo in LocalSettings.php
......................................................................

Installer can now customize the logo in LocalSettings.php

Bug: 40617
Change-Id: Ia6efdf931b0b6be7556fc16c040aa7493845cdfc
---
M RELEASE-NOTES-1.21
M includes/installer/Installer.i18n.php
M includes/installer/LocalSettingsGenerator.php
M includes/installer/WebInstallerPage.php
4 files changed, 11 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/17/56917/1

diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21
index 295eb7b..94eade7 100644
--- a/RELEASE-NOTES-1.21
+++ b/RELEASE-NOTES-1.21
@@ -122,6 +122,7 @@
   quotmarks, order and whitespace in the attribute list).
 
 === Bug fixes in 1.21 ===
+* (bug 40617) Installer can now customize the logo in LocalSettings.php
 * (bug 40353) SpecialDoubleRedirect should support interwiki redirects.
 * (bug 40352) fixDoubleRedirects.php should support interwiki redirects.
 * (bug 9237) SpecialBrokenRedirect should not list interwiki redirects.
diff --git a/includes/installer/Installer.i18n.php 
b/includes/installer/Installer.i18n.php
index ef055de..216ec57 100644
--- a/includes/installer/Installer.i18n.php
+++ b/includes/installer/Installer.i18n.php
@@ -455,6 +455,8 @@
        'config-logo-help'                => "MediaWiki's default skin includes 
space for a 135x160 pixel logo above the sidebar menu.
 Upload an image of the appropriate size, and enter the URL here.
 
+You can use \$wgStylePath or \$wgScriptPath if your logo is relative to those 
paths.
+
 If you do not want a logo, leave this box blank.",
        'config-instantcommons'           => 'Enable Instant Commons',
        'config-instantcommons-help'      => 
'[//www.mediawiki.org/wiki/InstantCommons Instant Commons] is a feature that 
allows wikis to use images, sounds and other media found on the 
[//commons.wikimedia.org/ Wikimedia Commons] site.
diff --git a/includes/installer/LocalSettingsGenerator.php 
b/includes/installer/LocalSettingsGenerator.php
index 7cb3779..72ea3db 100644
--- a/includes/installer/LocalSettingsGenerator.php
+++ b/includes/installer/LocalSettingsGenerator.php
@@ -62,12 +62,12 @@
                                'wgRightsText', 'wgMainCacheType', 
'wgEnableUploads',
                                'wgMainCacheType', '_MemCachedServers', 
'wgDBserver', 'wgDBuser',
                                'wgDBpassword', 'wgUseInstantCommons', 
'wgUpgradeKey', 'wgDefaultSkin',
-                               'wgMetaNamespace', 
'wgResourceLoaderMaxQueryLength'
+                               'wgMetaNamespace', 
'wgResourceLoaderMaxQueryLength', 'wgLogo',
                        ),
                        $db->getGlobalNames()
                );
 
-               $unescaped = array( 'wgRightsIcon' );
+               $unescaped = array( 'wgRightsIcon', 'wgLogo' );
                $boolItems = array(
                        'wgEnableEmail', 'wgEnableUserEmail', 
'wgEnotifUserTalk',
                        'wgEnotifWatchlist', 'wgEmailAuthentication', 
'wgEnableUploads', 'wgUseInstantCommons'
@@ -273,7 +273,7 @@
 
 ## 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!
-\$wgLogo = \"\$wgStylePath/common/images/wiki.png\";
+\$wgLogo             = \"{$this->values['wgLogo']}\";
 
 ## UPO means: this is also a user preference option
 
diff --git a/includes/installer/WebInstallerPage.php 
b/includes/installer/WebInstallerPage.php
index f352cf1..085456d 100644
--- a/includes/installer/WebInstallerPage.php
+++ b/includes/installer/WebInstallerPage.php
@@ -912,6 +912,10 @@
                                $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(
@@ -933,6 +937,7 @@
                        '</div>' .
                        $this->parent->getTextBox( array(
                                'var' => 'wgLogo',
+                               'value' => $logoString,
                                'label' => 'config-logo',
                                'attribs' => array( 'dir' => 'ltr' ),
                                'help' => $this->parent->getHelpBox( 
'config-logo-help' )

-- 
To view, visit https://gerrit.wikimedia.org/r/56917
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia6efdf931b0b6be7556fc16c040aa7493845cdfc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_21
Gerrit-Owner: MarkAHershberger <mhershber...@wikimedia.org>
Gerrit-Reviewer: Dereckson <dereck...@espace-win.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to