From: Sam Reed Date: Sun, 11 Dec 2011 21:07:39 +0000 (+0000) Subject: Make ApiQueryBase::addTitleInfo() add the pageid also X-Git-Tag: 1.31.0-rc.0~26068 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=76762a26b9e71932514904bad620f52f88da1715;p=lhc%2Fweb%2Fwiklou.git Make ApiQueryBase::addTitleInfo() add the pageid also --- diff --git a/includes/api/ApiQueryBase.php b/includes/api/ApiQueryBase.php index 4fe82de0cb..e3cf51f50c 100644 --- a/includes/api/ApiQueryBase.php +++ b/includes/api/ApiQueryBase.php @@ -296,7 +296,7 @@ abstract class ApiQueryBase extends ApiBase { } /** - * Add information (title and namespace) about a Title object to a + * Add information (title, ID and namespace) about a Title object to a * result array * @param $arr array Result array à la ApiResult * @param $title Title @@ -304,6 +304,7 @@ abstract class ApiQueryBase extends ApiBase { */ public static function addTitleInfo( &$arr, $title, $prefix = '' ) { $arr[$prefix . 'ns'] = intval( $title->getNamespace() ); + $arr[$prefix . 'pageid'] = $title->getArticleID(); $arr[$prefix . 'title'] = $title->getPrefixedText(); }