From: Brad Jorsch Date: Thu, 23 Apr 2015 13:13:42 +0000 (-0400) Subject: API: Remove metadata keys from indexpageids output X-Git-Tag: 1.31.0-rc.0~11583^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/Bar?a=commitdiff_plain;h=1de341dbf92898ddb0c8b134fd2b078b9a4ed794;p=lhc%2Fweb%2Fwiklou.git API: Remove metadata keys from indexpageids output While we could fix the issue at hand by moving the setArrayType() call, it's more robust to explicitly remove *all* metadata. Bug: T96942 Change-Id: I313b19339474ea34880ebef31851eefdf14a7a07 --- diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php index 082fccb670..bfe32052cb 100644 --- a/includes/api/ApiQuery.php +++ b/includes/api/ApiQuery.php @@ -448,7 +448,7 @@ class ApiQuery extends ApiBase { ApiResult::setArrayType( $pages, 'BCarray' ); if ( $this->mParams['indexpageids'] ) { - $pageIDs = array_keys( $pages ); + $pageIDs = array_keys( ApiResult::stripMetadataNonRecursive( $pages ) ); // json treats all map keys as strings - converting to match $pageIDs = array_map( 'strval', $pageIDs ); ApiResult::setIndexedTagName( $pageIDs, 'id' );