X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fapi%2FApiParamInfo.php;h=93fc51a7c692349c6645596d18adcec26a831681;hb=c8e482371407477ecd4f0a1b5778e565d3963a93;hp=17b00933a19d338e04d339aab8ab9c4d83becb64;hpb=a9007e8baf802f0f57d095e3bb4ad201c98c0cb3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiParamInfo.php b/includes/api/ApiParamInfo.php index 17b00933a1..93fc51a7c6 100644 --- a/includes/api/ApiParamInfo.php +++ b/includes/api/ApiParamInfo.php @@ -163,7 +163,7 @@ class ApiParamInfo extends ApiBase { /** * List all submodules of a module * @param ApiBase $module - * @param boolean $recursive + * @param bool $recursive * @return string[] */ private function listAllSubmodules( ApiBase $module, $recursive ) { @@ -371,11 +371,15 @@ class ApiParamInfo extends ApiBase { $item['multi'] = !empty( $settings[ApiBase::PARAM_ISMULTI] ); if ( $item['multi'] ) { - $item['limit'] = $this->getMain()->canApiHighLimits() ? - ApiBase::LIMIT_SML2 : - ApiBase::LIMIT_SML1; - $item['lowlimit'] = ApiBase::LIMIT_SML1; - $item['highlimit'] = ApiBase::LIMIT_SML2; + $item['lowlimit'] = !empty( $settings[ApiBase::PARAM_ISMULTI_LIMIT1] ) + ? $settings[ApiBase::PARAM_ISMULTI_LIMIT1] + : ApiBase::LIMIT_SML1; + $item['highlimit'] = !empty( $settings[ApiBase::PARAM_ISMULTI_LIMIT2] ) + ? $settings[ApiBase::PARAM_ISMULTI_LIMIT2] + : ApiBase::LIMIT_SML2; + $item['limit'] = $this->getMain()->canApiHighLimits() + ? $item['highlimit'] + : $item['lowlimit']; } if ( !empty( $settings[ApiBase::PARAM_ALLOW_DUPLICATES] ) ) { @@ -467,6 +471,12 @@ class ApiParamInfo extends ApiBase { if ( !empty( $settings[ApiBase::PARAM_RANGE_ENFORCE] ) ) { $item['enforcerange'] = true; } + if ( isset( $settings[self::PARAM_MAX_BYTES] ) ) { + $item['maxbytes'] = $settings[self::PARAM_MAX_BYTES]; + } + if ( isset( $settings[self::PARAM_MAX_CHARS] ) ) { + $item['maxchars'] = $settings[self::PARAM_MAX_CHARS]; + } if ( !empty( $settings[ApiBase::PARAM_DEPRECATED_VALUES] ) ) { $deprecatedValues = array_keys( $settings[ApiBase::PARAM_DEPRECATED_VALUES] ); if ( is_array( $item['type'] ) ) {