r72329 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72328‎ | r72329 | r72330 >
Date:22:58, 3 September 2010
Author:reedy
Status:ok
Tags:
Comment:
Only display Examples section if it's got anything in the array
Modified paths:
  • /trunk/phase3/includes/api/ApiBase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiBase.php
@@ -254,8 +254,11 @@
255255 $examples
256256 );
257257 }
258 - $msg .= 'Example' . ( count( $examples ) > 1 ? 's' : '' ) . ":\n ";
259 - $msg .= implode( $lnPrfx, $examples ) . "\n";
 258+
 259+ if ( count( $examples ) > 0 ) {
 260+ $msg .= 'Example' . ( count( $examples ) > 1 ? 's' : '' ) . ":\n ";
 261+ $msg .= implode( $lnPrfx, $examples ) . "\n";
 262+ }
260263 }
261264
262265 if ( $this->getMain()->getShowVersions() ) {

Status & tagging log