r88469 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88468‎ | r88469 | r88470 >
Date:17:38, 20 May 2011
Author:reedy
Status:ok
Tags:
Comment:
While looking at bug 26990 on TW api, it was noticed with a load of NS's they don't word wrap

So make them wordwrap like the rest of the text
Modified paths:
  • /trunk/phase3/includes/api/ApiBase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiBase.php
@@ -347,7 +347,9 @@
348348 switch ( $type ) {
349349 case 'namespace':
350350 // Special handling because namespaces are type-limited, yet they are not given
351 - $desc .= $paramPrefix . $prompt . implode( ', ', MWNamespace::getValidNamespaces() );
 351+ $desc .= $paramPrefix . $prompt;
 352+ $desc .= wordwrap( implode( ', ', MWNamespace::getValidNamespaces() ),
 353+ 100, $descWordwrap );
352354 break;
353355 case 'limit':
354356 $desc .= $paramPrefix . "No more than {$paramSettings[self :: PARAM_MAX]}";

Status & tagging log