https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112290
Revision: 112290
Author: reedy
Date: 2012-02-24 02:06:39 +0000 (Fri, 24 Feb 2012)
Log Message:
-----------
Examples can just be a string
So if it's not false, it can be string|array, if it's a string, just put it in
an array
Modified Paths:
--------------
trunk/phase3/includes/api/ApiParamInfo.php
Modified: trunk/phase3/includes/api/ApiParamInfo.php
===================================================================
--- trunk/phase3/includes/api/ApiParamInfo.php 2012-02-24 01:43:33 UTC (rev
112289)
+++ trunk/phase3/includes/api/ApiParamInfo.php 2012-02-24 02:06:39 UTC (rev
112290)
@@ -147,6 +147,9 @@
$examples = $obj->getExamples();
$retval['allexamples'] = array();
if ( $examples !== false ) {
+ if ( is_string( $examples ) ) {
+ $examples = array( $examples );
+ }
foreach( $examples as $k => $v ) {
if ( strlen( $retval['examples'] ) ) {
$retval['examples'] .= ' ';
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs