r53406 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53405‎ | r53406 | r53407 >
Date:16:55, 17 July 2009
Author:werdna
Status:deferred
Tags:
Comment:
Bug 19604, backwards-compatibility issues with AbuseFilter count() function.
Modified paths:
  • /trunk/extensions/AbuseFilter/AbuseFilter.parser.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AbuseFilter/AbuseFilter.parser.php
@@ -1301,14 +1301,6 @@
13021302
13031303 if( $args[0]->type == AFPData::DList && count( $args ) == 1 ) {
13041304 return new AFPData( AFPData::DInt, count( $args[0]->data ) );
1305 - } elseif( count( $args ) > 1 && $args[1]->type == AFPData::DList ) {
1306 - $needle = $args[0];
1307 - $haystack = $args[1]->toList();
1308 - $count = 0;
1309 - foreach( $haystack as $item )
1310 - if( AFPData::equals( $needle, $item ))
1311 - $count++;
1312 - return new AFPData( AFPData::DInt, $count );
13131305 }
13141306
13151307 $offset = -1;

Status & tagging log