Index: trunk/extensions/AntiSpoof/batchAntiSpoof.php |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | |
14 | 14 | $result = $dbw->select( 'user', 'user_name', null, 'batchAntiSpoof.php' ); |
15 | 15 | $n = 0; |
16 | | -while ( $row = $dbw->fetchObject( $result ) ) { |
| 16 | +foreach( $res as $row ) { |
17 | 17 | if ( $n++ % $batchSize == 0 ) { |
18 | 18 | echo "$wgDBname $n\n"; |
19 | 19 | } |
Index: trunk/extensions/AntiSpoof/SpoofUser.php |
— | — | @@ -59,7 +59,7 @@ |
60 | 60 | ) ); |
61 | 61 | |
62 | 62 | $spoofs = array(); |
63 | | - while ( $row = $dbr->fetchObject( $spoofedUsers ) ) { |
| 63 | + foreach ( $spoofedUsers as $row ) { |
64 | 64 | array_push( $spoofs, $row->user_name ); |
65 | 65 | } |
66 | 66 | return $spoofs; |
Index: trunk/extensions/CommunityVoice/Modules/Ratings.php |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | 'DISTINCT vot_category' |
26 | 26 | ); |
27 | 27 | $categories = array(); |
28 | | - while ( $row = $result->fetchRow() ) { |
| 28 | + foreach( $result as $row ) { |
29 | 29 | $categories[] = (string)$row['vot_category']; |
30 | 30 | } |
31 | 31 | return $categories; |
Index: trunk/extensions/ProofreadPage/SpecialPagesWithoutScans.php |
— | — | @@ -84,7 +84,7 @@ |
85 | 85 | 'page_namespace' => $disPageObj->getNamespace(), 'page_title' => $disPageObj->getDBkey()), |
86 | 86 | __METHOD__ ); |
87 | 87 | |
88 | | - while ( $row = $dbr->fetchObject( $res ) ) { |
| 88 | + foreach ( $res as $row ) { |
89 | 89 | $linkBatch->addObj( Title::makeTitle( NS_TEMPLATE, $row->pl_title )); |
90 | 90 | } |
91 | 91 | |
— | — | @@ -94,8 +94,6 @@ |
95 | 95 | } |
96 | 96 | |
97 | 97 | function getSQL() { |
98 | | - global $wgContentNamespaces; |
99 | | - |
100 | 98 | $dbr = wfGetDB( DB_SLAVE ); |
101 | 99 | $page = $dbr->tableName( 'page' ); |
102 | 100 | $templatelinks = $dbr->tableName( 'templatelinks' ); |
Index: trunk/extensions/CentralAuth/migratePass0.php |
— | — | @@ -29,7 +29,7 @@ |
30 | 30 | "user_id BETWEEN $min AND $max", |
31 | 31 | __FUNCTION__ ); |
32 | 32 | |
33 | | - while ( $row = $dbr->fetchObject( $result ) ) { |
| 33 | + foreach( $result as $row ) { |
34 | 34 | $users[intval( $row->user_id )] = $row->user_name; |
35 | 35 | ++$migrated; |
36 | 36 | } |
Index: trunk/extensions/CentralAuth/migratePass1.php |
— | — | @@ -18,7 +18,7 @@ |
19 | 19 | array( 'gn_name' ), |
20 | 20 | '', |
21 | 21 | __METHOD__ ); |
22 | | - while ( $row = $dbBackground->fetchObject( $result ) ) { |
| 22 | + foreach( $result as $row ) { |
23 | 23 | $name = $row->gn_name; |
24 | 24 | $central = new CentralAuthUser( $name ); |
25 | 25 | if ( $central->storeAndMigrate() ) { |
Index: trunk/extensions/CentralAuth/migrateStewards.php |
— | — | @@ -16,7 +16,7 @@ |
17 | 17 | 'migrateStewards.php' |
18 | 18 | ); |
19 | 19 | $localStewards = array(); |
20 | | -while ( $row = $dbl->fetchObject( $result ) ) { |
| 20 | +foreach ( $result as $row ) { |
21 | 21 | $localStewards[] = $row->user_name; |
22 | 22 | } |
23 | 23 | |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | ), |
35 | 35 | 'migrateStewards.php' |
36 | 36 | ); |
37 | | -while ( $row = $dbl->fetchObject( $result ) ) { |
| 37 | +foreach ( $result as $row ) { |
38 | 38 | $globalStewards[$row->gu_name] = $row->gu_id; |
39 | 39 | } |
40 | 40 | |
Index: trunk/extensions/CheckUser/install.inc |
— | — | @@ -43,7 +43,7 @@ |
44 | 44 | $cond = "rc_id BETWEEN $blockStart AND $blockEnd $cutoffCond"; |
45 | 45 | $res = $db->select( 'recentchanges', '*', $cond, __FUNCTION__ ); |
46 | 46 | $batch = array(); |
47 | | - while ( $row = $db->fetchObject( $res ) ) { |
| 47 | + foreach ( $res as $row ) { |
48 | 48 | $batch[] = array( |
49 | 49 | 'cuc_timestamp' => $row->rc_timestamp, |
50 | 50 | 'cuc_user' => $row->rc_user, |