From 066112865603a02f22882df6d2c677ee206beb4b Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 12 Feb 2008 02:43:25 +0000 Subject: [PATCH] Dump obsolete pass-by-reference on QueryPage::preprocessResults() --- includes/QueryPage.php | 3 +-- includes/SpecialMostlinked.php | 2 +- includes/SpecialMostlinkedcategories.php | 2 +- includes/SpecialMostlinkedtemplates.php | 2 +- includes/SpecialNewpages.php | 2 +- includes/SpecialShortpages.php | 2 +- includes/SpecialWantedcategories.php | 2 +- includes/SpecialWantedpages.php | 2 +- 8 files changed, 8 insertions(+), 9 deletions(-) diff --git a/includes/QueryPage.php b/includes/QueryPage.php index 06710b6de0..6f635cbc23 100644 --- a/includes/QueryPage.php +++ b/includes/QueryPage.php @@ -443,9 +443,8 @@ class QueryPage { /** * Do any necessary preprocessing of the result object. - * You should pass this by reference: &$db , &$res [although probably no longer necessary in PHP5] */ - function preprocessResults( &$db, &$res ) {} + function preprocessResults( $db, $res ) {} /** * Similar to above, but packaging in a syndicated feed instead of a web page diff --git a/includes/SpecialMostlinked.php b/includes/SpecialMostlinked.php index b4de0a0e72..916f219bd1 100644 --- a/includes/SpecialMostlinked.php +++ b/includes/SpecialMostlinked.php @@ -39,7 +39,7 @@ class MostlinkedPage extends QueryPage { /** * Pre-fill the link cache */ - function preprocessResults( &$db, &$res ) { + function preprocessResults( $db, $res ) { if( $db->numRows( $res ) > 0 ) { $linkBatch = new LinkBatch(); while( $row = $db->fetchObject( $res ) ) diff --git a/includes/SpecialMostlinkedcategories.php b/includes/SpecialMostlinkedcategories.php index d0a99b3b2d..c357c8f408 100644 --- a/includes/SpecialMostlinkedcategories.php +++ b/includes/SpecialMostlinkedcategories.php @@ -35,7 +35,7 @@ class MostlinkedCategoriesPage extends QueryPage { /** * Fetch user page links and cache their existence */ - function preprocessResults( &$db, &$res ) { + function preprocessResults( $db, $res ) { $batch = new LinkBatch; while ( $row = $db->fetchObject( $res ) ) $batch->addObj( Title::makeTitleSafe( $row->namespace, $row->title ) ); diff --git a/includes/SpecialMostlinkedtemplates.php b/includes/SpecialMostlinkedtemplates.php index e68b0909a6..b0f1b196e4 100644 --- a/includes/SpecialMostlinkedtemplates.php +++ b/includes/SpecialMostlinkedtemplates.php @@ -69,7 +69,7 @@ class SpecialMostlinkedtemplates extends QueryPage { * @param Database $dbr Database connection * @param int $res Result pointer */ - public function preprocessResults( &$dbr, &$res ) { + public function preprocessResults( $dbr, $res ) { $batch = new LinkBatch(); while( $row = $dbr->fetchObject( $res ) ) { $title = Title::makeTitleSafe( $row->namespace, $row->title ); diff --git a/includes/SpecialNewpages.php b/includes/SpecialNewpages.php index 9089bb9c7e..1c3bee84c4 100644 --- a/includes/SpecialNewpages.php +++ b/includes/SpecialNewpages.php @@ -180,7 +180,7 @@ class NewPagesPage extends QueryPage { WHERE rc_cur_id=page_id AND $condstext"; } - function preprocessResults( &$db, &$res ) { + function preprocessResults( $db, $res ) { # Do a batch existence check on the user and talk pages $linkBatch = new LinkBatch(); while( $row = $db->fetchObject( $res ) ) { diff --git a/includes/SpecialShortpages.php b/includes/SpecialShortpages.php index 973656ddaa..5aa363862b 100644 --- a/includes/SpecialShortpages.php +++ b/includes/SpecialShortpages.php @@ -41,7 +41,7 @@ class ShortPagesPage extends QueryPage { WHERE page_namespace=".NS_MAIN." AND page_is_redirect=0"; } - function preprocessResults( &$db, &$res ) { + function preprocessResults( $db, $res ) { # There's no point doing a batch check if we aren't caching results; # the page must exist for it to have been pulled out of the table if( $this->isCached() ) { diff --git a/includes/SpecialWantedcategories.php b/includes/SpecialWantedcategories.php index f3e8966ca4..580cc6de65 100644 --- a/includes/SpecialWantedcategories.php +++ b/includes/SpecialWantedcategories.php @@ -37,7 +37,7 @@ class WantedCategoriesPage extends QueryPage { /** * Fetch user page links and cache their existence */ - function preprocessResults( &$db, &$res ) { + function preprocessResults( $db, $res ) { $batch = new LinkBatch; while ( $row = $db->fetchObject( $res ) ) $batch->addObj( Title::makeTitleSafe( $row->namespace, $row->title ) ); diff --git a/includes/SpecialWantedpages.php b/includes/SpecialWantedpages.php index 5fc45a8834..1fb8cdbb48 100644 --- a/includes/SpecialWantedpages.php +++ b/includes/SpecialWantedpages.php @@ -51,7 +51,7 @@ class WantedPagesPage extends QueryPage { /** * Cache page existence for performance */ - function preprocessResults( &$db, &$res ) { + function preprocessResults( $db, $res ) { $batch = new LinkBatch; while ( $row = $db->fetchObject( $res ) ) $batch->addObj( Title::makeTitleSafe( $row->namespace, $row->title ) ); -- 2.20.1