Dump obsolete pass-by-reference on QueryPage::preprocessResults()
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 12 Feb 2008 02:43:25 +0000 (02:43 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 12 Feb 2008 02:43:25 +0000 (02:43 +0000)
includes/QueryPage.php
includes/SpecialMostlinked.php
includes/SpecialMostlinkedcategories.php
includes/SpecialMostlinkedtemplates.php
includes/SpecialNewpages.php
includes/SpecialShortpages.php
includes/SpecialWantedcategories.php
includes/SpecialWantedpages.php

index 06710b6..6f635cb 100644 (file)
@@ -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
index b4de0a0..916f219 100644 (file)
@@ -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 ) )
index d0a99b3..c357c8f 100644 (file)
@@ -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 ) );
index e68b090..b0f1b19 100644 (file)
@@ -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 );
index 9089bb9..1c3bee8 100644 (file)
@@ -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 ) ) {
index 973656d..5aa3638 100644 (file)
@@ -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() ) {
index f3e8966..580cc6d 100644 (file)
@@ -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 ) );
index 5fc45a8..1fb8cdb 100644 (file)
@@ -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 ) );