Index: branches/wmf/1.17wmf1/extensions/AbuseFilter/ApiQueryAbuseFilters.php |
— | — | @@ -97,7 +97,7 @@ |
98 | 98 | $showhidden = $wgUser->isAllowed( 'abusefilter-modify' ); |
99 | 99 | |
100 | 100 | $count = 0; |
101 | | - foreach ( $res as $row ) { |
| 101 | + while ( $row = $res->fetchObject() ) { |
102 | 102 | if ( ++$count > $params['limit'] ) { |
103 | 103 | // We've had enough |
104 | 104 | $this->setContinueEnumParameter( 'startid', $row->af_id ); |
Index: branches/wmf/1.17wmf1/extensions/AbuseFilter/AbuseFilterVariableHolder.php |
— | — | @@ -330,7 +330,7 @@ |
331 | 331 | ); |
332 | 332 | |
333 | 333 | $users = array(); |
334 | | - foreach ( $res as $user ) { |
| 334 | + while ( $user = $dbr->fetchRow( $res ) ) { |
335 | 335 | $users[] = $user[0]; |
336 | 336 | } |
337 | 337 | $result = $users; |
Index: branches/wmf/1.17wmf1/extensions/AbuseFilter/ApiQueryAbuseLog.php |
— | — | @@ -104,7 +104,7 @@ |
105 | 105 | $res = $this->select( __METHOD__ ); |
106 | 106 | |
107 | 107 | $count = 0; |
108 | | - foreach ( $res as $row ) { |
| 108 | + while ( $row = $res->fetchObject() ) { |
109 | 109 | if ( ++$count > $params['limit'] ) { |
110 | 110 | // We've had enough |
111 | 111 | $this->setContinueEnumParameter( 'start', wfTimestamp( TS_ISO_8601, $row->afl_timestamp ) ); |
Index: branches/wmf/1.17wmf1/extensions/AbuseFilter/AbuseFilter.hooks.php |
— | — | @@ -155,7 +155,7 @@ |
156 | 156 | array( 'abuse_filter' => array( 'INNER JOIN', 'afa_filter=af_id' ) ) |
157 | 157 | ); |
158 | 158 | |
159 | | - foreach ( $res as $row ) { |
| 159 | + while ( $row = $res->fetchObject() ) { |
160 | 160 | $emptyTags = array_filter( |
161 | 161 | array_merge( explode( "\n", $row->afa_parameters ), $emptyTags ) |
162 | 162 | ); |