From 1de341dbf92898ddb0c8b134fd2b078b9a4ed794 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Thu, 23 Apr 2015 09:13:42 -0400 Subject: [PATCH] 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 --- includes/api/ApiQuery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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' ); -- 2.20.1