From: Niklas Laxström Date: Sun, 5 Dec 2010 10:41:58 +0000 (+0000) Subject: Follow-up r77763, get rid of boolean param and whitespace fixes X-Git-Tag: 1.31.0-rc.0~33553 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=2ef6a1a46ea9a03d62c66ec80d69fca25961ab66;p=lhc%2Fweb%2Fwiklou.git Follow-up r77763, get rid of boolean param and whitespace fixes --- 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' ); ?>