Index: trunk/phase3/includes/MessageCache.php |
— | — | @@ -343,10 +343,9 @@ |
344 | 344 | |
345 | 345 | # Load titles for all oversized pages in the MediaWiki namespace |
346 | 346 | $res = $dbr->select( 'page', 'page_title', $bigConds, __METHOD__ . "($code)-big" ); |
347 | | - while ( $row = $dbr->fetchObject( $res ) ) { |
| 347 | + foreach ( $res as $row ) { |
348 | 348 | $cache[$row->page_title] = '!TOO BIG'; |
349 | 349 | } |
350 | | - $dbr->freeResult( $res ); |
351 | 350 | |
352 | 351 | # Conditions to load the remaining pages with their contents |
353 | 352 | $smallConds = $conds; |
— | — | @@ -358,10 +357,9 @@ |
359 | 358 | array( 'page_title', 'old_text', 'old_flags' ), |
360 | 359 | $smallConds, __METHOD__ . "($code)-small" ); |
361 | 360 | |
362 | | - for ( $row = $dbr->fetchObject( $res ); $row; $row = $dbr->fetchObject( $res ) ) { |
| 361 | + foreach ( $res as $row ) { |
363 | 362 | $cache[$row->page_title] = ' ' . Revision::getRevisionText( $row ); |
364 | 363 | } |
365 | | - $dbr->freeResult( $res ); |
366 | 364 | |
367 | 365 | $cache['VERSION'] = MSG_CACHE_VERSION; |
368 | 366 | wfProfileOut( __METHOD__ ); |