From: Sam Reed Date: Sat, 4 Dec 2010 00:36:33 +0000 (+0000) Subject: Followup r77666, bug 26219 X-Git-Tag: 1.31.0-rc.0~33586 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=492ac9b4bf9b441deb4e647d950a3f521253f458;p=lhc%2Fweb%2Fwiklou.git 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 --- diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 95397d5b36..5bc99a698d 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -368,8 +368,13 @@ abstract class ApiBase { } if ( isset( $paramSettings[self::PARAM_ISMULTI] ) ) { - $desc .= $paramPrefix . "Maximum number of values " . + $isArray = is_array( $paramSettings[self::PARAM_TYPE] ); + + if ( !$isArray + || $isArray && count( $paramSettings[self::PARAM_TYPE] ) > self::LIMIT_SML1) { + $desc .= $paramPrefix . "Maximum number of values " . self::LIMIT_SML1 . " (" . self::LIMIT_SML2 . " for bots)"; + } } } }