http://www.mediawiki.org/wiki/Special:Code/MediaWiki/100687
Revision: 100687
Author: hashar
Date: 2011-10-25 10:22:18 +0000 (Tue, 25 Oct 2011)
Log Message:
-----------
(bug 31656) AbuseFilter skips non null edits
This bug is triggering when a user submit an old revision again. AbuseFilter
considered it to be a null edit although the old revision is certainly
a different text than the current one in the database.
This patch make sure we skip filtering only if we will be comparing with the
lastest content.
Follow up r52740
Modified Paths:
--------------
trunk/extensions/AbuseFilter/AbuseFilter.hooks.php
Modified: trunk/extensions/AbuseFilter/AbuseFilter.hooks.php
===================================================================
--- trunk/extensions/AbuseFilter/AbuseFilter.hooks.php 2011-10-25 10:00:47 UTC
(rev 100686)
+++ trunk/extensions/AbuseFilter/AbuseFilter.hooks.php 2011-10-25 10:22:18 UTC
(rev 100687)
@@ -29,11 +29,14 @@
$oldtext = '';
if ( $editor->mArticle->exists() ) {
+ // Fetch text which might be an old revision
$oldtext = $editor->mArticle->getContent();
}
- if ( strcmp( $oldtext, $text ) == 0 ) {
- // Don't trigger for null edits.
+ if ( $editor->mArticle->isCurrent() && strcmp( $oldtext, $text
) == 0) {
+ // Do not trigger if used text was the latest in the
database and user
+ // submitted text does not introduce any difference.
+ // See bugs 19267 & 31656.
return true;
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs