From c4b687dc98dffb4f06f1f8d6f4b757f3ecf77108 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Wed, 12 Jan 2011 00:24:25 +0000 Subject: [PATCH] initFromQueryResult doesn't use the $db parameter. Private method, updated callers to not pass it. --- includes/api/ApiPageSet.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php index f0de2961bb..1cb734edf6 100644 --- a/includes/api/ApiPageSet.php +++ b/includes/api/ApiPageSet.php @@ -351,7 +351,7 @@ class ApiPageSet extends ApiQueryBase { */ public function populateFromQueryResult( $db, $queryResult ) { $this->profileIn(); - $this->initFromQueryResult( $db, $queryResult ); + $this->initFromQueryResult( $queryResult ); $this->profileOut(); } @@ -430,7 +430,7 @@ class ApiPageSet extends ApiQueryBase { $this->profileDBOut(); // Hack: get the ns:titles stored in array(ns => array(titles)) format - $this->initFromQueryResult( $db, $res, $linkBatch->data, true ); // process Titles + $this->initFromQueryResult( $res, $linkBatch->data, true ); // process Titles // Resolve any found redirects $this->resolvePendingRedirects(); @@ -458,7 +458,7 @@ class ApiPageSet extends ApiQueryBase { $this->profileDBOut(); $remaining = array_flip( $pageids ); - $this->initFromQueryResult( $db, $res, $remaining, false ); // process PageIDs + $this->initFromQueryResult( $res, $remaining, false ); // process PageIDs // Resolve any found redirects $this->resolvePendingRedirects(); @@ -467,7 +467,6 @@ class ApiPageSet extends ApiQueryBase { /** * Iterate through the result of the query on 'page' table, * and for each row create and store title object and save any extra fields requested. - * @param $db Database * @param $res ResultWrapper DB Query result * @param $remaining array of either pageID or ns/title elements (optional). * If given, any missing items will go to $mMissingPageIDs and $mMissingTitles @@ -475,7 +474,7 @@ class ApiPageSet extends ApiQueryBase { * If true, treat $remaining as an array of [ns][title] * If false, treat it as an array of [pageIDs] */ - private function initFromQueryResult( $db, $res, &$remaining = null, $processTitles = null ) { + private function initFromQueryResult( $res, &$remaining = null, $processTitles = null ) { if ( !is_null( $remaining ) && is_null( $processTitles ) ) { ApiBase::dieDebug( __METHOD__, 'Missing $processTitles parameter when $remaining is provided' ); } @@ -589,7 +588,7 @@ class ApiPageSet extends ApiQueryBase { $this->profileDBOut(); // Hack: get the ns:titles stored in array(ns => array(titles)) format - $this->initFromQueryResult( $db, $res, $linkBatch->data, true ); + $this->initFromQueryResult( $res, $linkBatch->data, true ); } } } -- 2.20.1