r81754 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81753‎ | r81754 | r81755 >
Date:15:33, 8 February 2011
Author:catrope
Status:ok
Tags:
Comment:
1.17wmf1: MFT r81753
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/AbuseFilter/AbuseFilter.hooks.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/AbuseFilter/AbuseFilterVariableHolder.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/AbuseFilter/ApiQueryAbuseFilters.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/AbuseFilter/ApiQueryAbuseLog.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/AbuseFilter/ApiQueryAbuseFilters.php
@@ -97,7 +97,7 @@
9898 $showhidden = $wgUser->isAllowed( 'abusefilter-modify' );
9999
100100 $count = 0;
101 - foreach ( $res as $row ) {
 101+ while ( $row = $res->fetchObject() ) {
102102 if ( ++$count > $params['limit'] ) {
103103 // We've had enough
104104 $this->setContinueEnumParameter( 'startid', $row->af_id );
Index: branches/wmf/1.17wmf1/extensions/AbuseFilter/AbuseFilterVariableHolder.php
@@ -330,7 +330,7 @@
331331 );
332332
333333 $users = array();
334 - foreach ( $res as $user ) {
 334+ while ( $user = $dbr->fetchRow( $res ) ) {
335335 $users[] = $user[0];
336336 }
337337 $result = $users;
Index: branches/wmf/1.17wmf1/extensions/AbuseFilter/ApiQueryAbuseLog.php
@@ -104,7 +104,7 @@
105105 $res = $this->select( __METHOD__ );
106106
107107 $count = 0;
108 - foreach ( $res as $row ) {
 108+ while ( $row = $res->fetchObject() ) {
109109 if ( ++$count > $params['limit'] ) {
110110 // We've had enough
111111 $this->setContinueEnumParameter( 'start', wfTimestamp( TS_ISO_8601, $row->afl_timestamp ) );
Index: branches/wmf/1.17wmf1/extensions/AbuseFilter/AbuseFilter.hooks.php
@@ -155,7 +155,7 @@
156156 array( 'abuse_filter' => array( 'INNER JOIN', 'afa_filter=af_id' ) )
157157 );
158158
159 - foreach ( $res as $row ) {
 159+ while ( $row = $res->fetchObject() ) {
160160 $emptyTags = array_filter(
161161 array_merge( explode( "\n", $row->afa_parameters ), $emptyTags )
162162 );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r81753Revert 75677 for AbuseFilter, caused fatalscatrope15:33, 8 February 2011

Status & tagging log