Coding style
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Mon, 20 Sep 2010 13:35:51 +0000 (13:35 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Mon, 20 Sep 2010 13:35:51 +0000 (13:35 +0000)
includes/specials/SpecialShortpages.php

index 8ef53d2..989e4c0 100644 (file)
@@ -72,11 +72,13 @@ class ShortPagesPage extends QueryPage {
                # the page must exist for it to have been pulled out of the table
                if( $this->isCached() ) {
                        $batch = new LinkBatch();
-                       while( $row = $db->fetchObject( $res ) )
+                       foreach ( $res as $row ) {
                                $batch->add( $row->namespace, $row->title );
+                       }
                        $batch->execute();
-                       if( $db->numRows( $res ) > 0 )
+                       if ( $db->numRows( $res ) > 0 ) {
                                $db->dataSeek( $res, 0 );
+                       }
                }
        }