Per http://www.mediawiki.org/wiki/Special:Code/MediaWiki/66168#c7252 switch while...
[lhc/web/wiklou.git] / includes / api / ApiQueryAllLinks.php
index ced7e0c..e1a56d7 100644 (file)
@@ -111,7 +111,7 @@ class ApiQueryAllLinks extends ApiQueryGeneratorBase {
                $pageids = array();
                $count = 0;
                $result = $this->getResult();
-               while ( $row = $db->fetchObject( $res ) ) {
+               foreach ( $res as $row ) {
                        if ( ++ $count > $limit ) {
                                // We've reached the one extra which shows that there are additional pages to be had. Stop here...
                                // TODO: Security issue - if the user has no right to view next title, it will still be shown