From 492ac9b4bf9b441deb4e647d950a3f521253f458 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sat, 4 Dec 2010 00:36:33 +0000 Subject: [PATCH] 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 --- includes/api/ApiBase.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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)"; + } } } } -- 2.20.1