r106868 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106867‎ | r106868 | r106869 >
Date:21:37, 20 December 2011
Author:brion
Status:ok
Tags:
Comment:
Provisional revert of r105831: as noted it's not safe; alternative fix was a weird abstraction violation that would leave you not knowing whether the data would be present or not.
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryBase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryBase.php
@@ -296,7 +296,7 @@
297297 }
298298
299299 /**
300 - * Add information (title, ID and namespace) about a Title object to a
 300+ * Add information (title and namespace) about a Title object to a
301301 * result array
302302 * @param $arr array Result array à la ApiResult
303303 * @param $title Title
@@ -304,7 +304,6 @@
305305 */
306306 public static function addTitleInfo( &$arr, $title, $prefix = '' ) {
307307 $arr[$prefix . 'ns'] = intval( $title->getNamespace() );
308 - $arr[$prefix . 'pageid'] = $title->getArticleID();
309308 $arr[$prefix . 'title'] = $title->getPrefixedText();
310309 }
311310

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r105831Make ApiQueryBase::addTitleInfo() add the pageid alsoreedy21:07, 11 December 2011

Status & tagging log