From 8c9a20833e9520971dfd6792be79ff98d538cff8 Mon Sep 17 00:00:00 2001 From: Daniel Friesen Date: Thu, 3 Feb 2011 00:00:58 +0000 Subject: [PATCH] Commit some fixes for comments on r77741 --- includes/DefaultSettings.php | 15 ++++++++++----- includes/Skin.php | 2 +- includes/SkinTemplate.php | 1 - 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 2fd7a86118..116aacc76f 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -2329,11 +2329,13 @@ $wgExperimentalHtmlIds = true; * $wgFooterIcons itself is a key/value array. * The key is the name of a block that the icons will be wrapped in. The final id varies * by skin; Monobook and Vector will turn poweredby into f-poweredbyico while Modern - * turns it into mw_poweredby. The value is a key/value array of icons. The key may or - * may not be used by the skin but it can be used to find the icon and unset it or - * change the icon if needed. This is useful for disabling icons that are set by extensions. + * turns it into mw_poweredby. + * The value is either key/value array of icons or a string. + * In the key/value array the key may or may not be used by the skin but it can + * be used to find the icon and unset it or change the icon if needed. + * This is useful for disabling icons that are set by extensions. * The value should be either a string or an array. If it is a string it will be output - * directly, however some skins may choose to ignore it. An array is the preferred format + * directly as html, however some skins may choose to ignore it. An array is the preferred format * for the icon, the following keys are used: * src: An absolute url to the image to use for the icon, this is recommended * but not required, however some skins will ignore icons without an image @@ -4352,7 +4354,10 @@ $wgRightsIcon = null; */ $wgLicenseTerms = false; -/** Set this to some HTML to override the rights icon with an arbitrary logo */ +/** + * Set this to some HTML to override the rights icon with an arbitrary logo + * @deprecated Use $wgFooterIcons['copyright']['copyright'] + */ $wgCopyrightIcon = null; /** Set this to true if you want detailed copyright information forms on Upload. */ diff --git a/includes/Skin.php b/includes/Skin.php index b5309f412f..b5f407d433 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -1698,7 +1698,7 @@ class Skin extends Linker { if ( is_string( $icon ) ) { $html = $icon; } else { // Assuming array - $url = $icon["url"]; + $url = isset($icon["url"]) ? $icon["url"] : null; unset( $icon["url"] ); if ( isset( $icon["src"] ) && $withImage === 'withImage' ) { $html = Html::element( 'img', $icon ); // do this the lazy way, just pass icon data as an attribute array diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 73c60bcd3c..0e9b52b2f9 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -1727,7 +1727,6 @@ abstract class BaseTemplate extends QuickTemplate { } } } elseif ( $option == 'nocopyright' ) { - $footericons = $this->data['footericons']; unset( $footericons['copyright']['copyright'] ); if ( count( $footericons['copyright'] ) <= 0 ) { unset( $footericons['copyright'] ); -- 2.20.1