From: Mako Bates Date: Wed, 9 Aug 2017 21:54:44 +0000 (+0000) Subject: Add page id to the API representation of pages in search results X-Git-Tag: 1.31.0-rc.0~2427^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=c30ef9829385bb862b9cadc9312e0352ae523453 Add page id to the API representation of pages in search results 'pageid' is now an always-on property returned by API:Search. Change made in ApiQuerySearch.php::getSearchResultData(). Bug: T172700 Change-Id: I9d856efdd1d72c70bf9fb72c82b1f276abef8b16 --- diff --git a/includes/api/ApiQuerySearch.php b/includes/api/ApiQuerySearch.php index 0dd8922859..f0c4180069 100644 --- a/includes/api/ApiQuerySearch.php +++ b/includes/api/ApiQuerySearch.php @@ -233,6 +233,7 @@ class ApiQuerySearch extends ApiQueryGeneratorBase { $title = $result->getTitle(); ApiQueryBase::addTitleInfo( $vals, $title ); + $vals['pageid'] = $title->getArticleID(); if ( isset( $prop['size'] ) ) { $vals['size'] = $result->getByteSize();