mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 06:03:49 +00:00
Revert 75677 for AbuseFilter, caused fatals
This commit is contained in:
parent
76405ecb9d
commit
802ea446a4
|
@ -155,7 +155,7 @@ class AbuseFilterHooks {
|
|||
array( 'abuse_filter' => array( 'INNER JOIN', 'afa_filter=af_id' ) )
|
||||
);
|
||||
|
||||
foreach ( $res as $row ) {
|
||||
while ( $row = $res->fetchObject() ) {
|
||||
$emptyTags = array_filter(
|
||||
array_merge( explode( "\n", $row->afa_parameters ), $emptyTags )
|
||||
);
|
||||
|
|
|
@ -330,7 +330,7 @@ class AFComputedVariable {
|
|||
);
|
||||
|
||||
$users = array();
|
||||
foreach ( $res as $user ) {
|
||||
while ( $user = $dbr->fetchRow( $res ) ) {
|
||||
$users[] = $user[0];
|
||||
}
|
||||
$result = $users;
|
||||
|
|
|
@ -97,7 +97,7 @@ class ApiQueryAbuseFilters extends ApiQueryBase {
|
|||
$showhidden = $wgUser->isAllowed( 'abusefilter-modify' );
|
||||
|
||||
$count = 0;
|
||||
foreach ( $res as $row ) {
|
||||
while ( $row = $res->fetchObject() ) {
|
||||
if ( ++$count > $params['limit'] ) {
|
||||
// We've had enough
|
||||
$this->setContinueEnumParameter( 'startid', $row->af_id );
|
||||
|
|
|
@ -104,7 +104,7 @@ class ApiQueryAbuseLog extends ApiQueryBase {
|
|||
$res = $this->select( __METHOD__ );
|
||||
|
||||
$count = 0;
|
||||
foreach ( $res as $row ) {
|
||||
while ( $row = $res->fetchObject() ) {
|
||||
if ( ++$count > $params['limit'] ) {
|
||||
// We've had enough
|
||||
$this->setContinueEnumParameter( 'start', wfTimestamp( TS_ISO_8601, $row->afl_timestamp ) );
|
||||
|
|
Loading…
Reference in a new issue