r77697 MediaWiki - Code Review archive
Repository:
MediaWiki
Revision:
<
r77696
|
r77697
|
r77698
>
Date:
00:36, 4 December 2010
Author:
reedy
Status:
ok
Tags:
Comment:
Followup
r77666
,
bug 26219
Only add the message about multi value, if the type is not an array, or if it is an array, if it has over 50 (LIMIT_SML1) items
Modified paths:
/trunk/phase3/includes/api/ApiBase.php
(modified) (
history
)
Diff
[
purge
]
Index: trunk/phase3/includes/api/ApiBase.php
—
—
@@ -368,8 +368,13 @@
369
369
}
370
370
371
371
if ( isset( $paramSettings[self::PARAM_ISMULTI] ) ) {
372
- $desc .= $paramPrefix . "Maximum number of values " .
372
+ $isArray = is_array( $paramSettings[self::PARAM_TYPE] );
373
+
374
+ if ( !$isArray
375
+ || $isArray && count( $paramSettings[self::PARAM_TYPE] ) > self::LIMIT_SML1) {
376
+ $desc .= $paramPrefix . "Maximum number of values " .
373
377
self::LIMIT_SML1 . " (" . self::LIMIT_SML2 . " for bots)";
378
+ }
374
379
}
375
380
}
376
381
}
Past revisions this follows-up on
Revision
Commit summary
Author
Date
r77666
* (
bug 26219
) Show API limits for multi values in description...
reedy
16:24, 3 December 2010
Status & tagging log
13:25, 5 December 2010
Catrope
(
talk
|
contribs
)
changed the
status
of r77697
[
removed:
new
added:
ok]