MarkAHershberger has uploaded a new change for review. https://gerrit.wikimedia.org/r/56918
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 merge Change-Id: I20c8888d6d531b0d446402ffebb0647d4b5dc05f backport release notes Ia6efdf931b0b6be7556fc16c040aa7493845cdfc Change-Id: I4e1ad1119ae7b6cea8e89aaebaabb8ee3aa034f6 --- 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/18/56918/1 diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21 index 50fd734..3743549 100644 --- a/RELEASE-NOTES-1.21 +++ b/RELEASE-NOTES-1.21 @@ -130,6 +130,7 @@ by adding a new configuration variable $wgApplyIpBlocksToXff (disabled by default). === 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 02f0c47..5e36a60 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 aa7fc97..cf45dcb 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 305c012..593509e 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -933,6 +933,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( @@ -954,6 +958,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/56918 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4e1ad1119ae7b6cea8e89aaebaabb8ee3aa034f6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master 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