From 2ef6a1a46ea9a03d62c66ec80d69fca25961ab66 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Sun, 5 Dec 2010 10:41:58 +0000 Subject: [PATCH] Follow-up r77763, get rid of boolean param and whitespace fixes --- includes/Skin.php | 14 +++++++------- skins/Modern.php | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/includes/Skin.php b/includes/Skin.php index 11a4651b24..1aefb1bbf7 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -1633,18 +1633,18 @@ class Skin extends Linker { /** * Renders a $wgFooterIcons icon acording to the method's arguments * @param $icon Array: The icon to build the html for - * @param $useImg Boolean: Whether to use the icon's image or output a text-only footericon + * @param $withImage Boolean: Whether to use the icon's image or output a text-only footericon */ - function makeFooterIcon( $icon, $useImg = true ) { - if ( is_string($icon) ) { + function makeFooterIcon( $icon, $withImage = 'withImage' ) { + if ( is_string( $icon ) ) { $html = $icon; - } else { + } else { // Assuming array $url = $icon["url"]; - unset($icon["url"]); - if ( isset($icon["src"]) && $useImg ) { + 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 } else { - $html = htmlspecialchars($icon["alt"]); + $html = htmlspecialchars( $icon["alt"] ); } if ( $url ) { $html = Html::rawElement( 'a', array( "href" => $url ), $html ); diff --git a/skins/Modern.php b/skins/Modern.php index 27f958eef5..752d0ded25 100644 --- a/skins/Modern.php +++ b/skins/Modern.php @@ -195,7 +195,7 @@ class ModernTemplate extends MonoBookTemplate {
- skin->makeFooterIcon( $icon, false ); ?> + skin->makeFooterIcon( $icon, 'withoutImage' ); ?> -- 2.20.1