X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiParamInfo.php;h=67983e7a3aa080340cd9551f1dfd2fa5d3d7b1e2;hb=3287201b673c6e52c04e9f8771c0e71d1a617910;hp=46ba34b4404556c65e37b721fe2fcb57c880b156;hpb=b8da5c83743ea31c6f73c063508384f114748537;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiParamInfo.php b/includes/api/ApiParamInfo.php index 46ba34b440..67983e7a3a 100644 --- a/includes/api/ApiParamInfo.php +++ b/includes/api/ApiParamInfo.php @@ -426,6 +426,15 @@ class ApiParamInfo extends ApiBase { ( is_array( $item['type'] ) || $item['type'] === 'namespace' ) ) { $item['allspecifier'] = $allSpecifier; } + + if ( $item['type'] === 'namespace' && + isset( $settings[ApiBase::PARAM_EXTRA_NAMESPACES] ) && + is_array( $settings[ApiBase::PARAM_EXTRA_NAMESPACES] ) + ) { + $item['extranamespaces'] = $settings[ApiBase::PARAM_EXTRA_NAMESPACES]; + ApiResult::setArrayType( $item['extranamespaces'], 'array' ); + ApiResult::setIndexedTagName( $item['extranamespaces'], 'ns' ); + } } if ( isset( $settings[ApiBase::PARAM_MAX] ) ) { $item['max'] = $settings[ApiBase::PARAM_MAX];