r77791 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77790‎ | r77791 | r77792 >
Date:10:41, 5 December 2010
Author:nikerabbit
Status:ok
Tags:
Comment:
Follow-up r77763, get rid of boolean param and whitespace fixes
Modified paths:
  • /trunk/phase3/includes/Skin.php (modified) (history)
  • /trunk/phase3/skins/Modern.php (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/Modern.php
@@ -195,7 +195,7 @@
196196 <div id="mw_<?php echo htmlspecialchars($blockName); ?>">
197197 <?php
198198 foreach ( $footerIcons as $icon ) { ?>
199 - <?php echo $this->skin->makeFooterIcon( $icon, false ); ?>
 199+ <?php echo $this->skin->makeFooterIcon( $icon, 'withoutImage' ); ?>
200200
201201 <?php
202202 } ?>
Index: trunk/phase3/includes/Skin.php
@@ -1633,18 +1633,18 @@
16341634 /**
16351635 * Renders a $wgFooterIcons icon acording to the method's arguments
16361636 * @param $icon Array: The icon to build the html for
1637 - * @param $useImg Boolean: Whether to use the icon's image or output a text-only footericon
 1637+ * @param $withImage Boolean: Whether to use the icon's image or output a text-only footericon
16381638 */
1639 - function makeFooterIcon( $icon, $useImg = true ) {
1640 - if ( is_string($icon) ) {
 1639+ function makeFooterIcon( $icon, $withImage = 'withImage' ) {
 1640+ if ( is_string( $icon ) ) {
16411641 $html = $icon;
1642 - } else {
 1642+ } else { // Assuming array
16431643 $url = $icon["url"];
1644 - unset($icon["url"]);
1645 - if ( isset($icon["src"]) && $useImg ) {
 1644+ unset( $icon["url"] );
 1645+ if ( isset( $icon["src"] ) && $withImage === 'withImage' ) {
16461646 $html = Html::element( 'img', $icon ); // do this the lazy way, just pass icon data as an attribute array
16471647 } else {
1648 - $html = htmlspecialchars($icon["alt"]);
 1648+ $html = htmlspecialchars( $icon["alt"] );
16491649 }
16501650 if ( $url ) {
16511651 $html = Html::rawElement( 'a', array( "href" => $url ), $html );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r77763Take the footer icon html building common to all 3 skins using r77741 $wgFoot...dantman04:44, 5 December 2010

Status & tagging log