Last modified: 2013-07-15 10:51:00 UTC
Created attachment 12844 [details] Example It is unreliable to test if a user edited a page recently with the code ---------------------------------------- user_name in article_recent_contributors ---------------------------------------- because this will test if the sring in the left is part of the other string (which seems to be a "\n" separated list of usernames, per bug 50107 comment 3). E.g.: if [[user:example]] is the only one who edited a page, the code above would detect both [[user:example]] and [[user:ample]] as editors of that page. See the screenshot
There seems to be a piece of dead code for this at https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FAbuseFilter.git/HEAD/AbuseFilter.parser.php#L223 public static function listContains( $value, $list ) { // Should use built-in PHP function somehow foreach ( $list->data as $item ) { if ( self::equals( $value, $item ) ) { return true; } } return false; }