r47737 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47736‎ | r47737 | r47738 >
Date:04:42, 24 February 2009
Author:nicdumz
Status:ok
Tags:
Comment:
Adding "ignoreEditSummary" configuration possibility, per http://thread.gmane.org/gmane.science.linguistics.wikipedia.technical/41993
Modified paths:
  • /trunk/extensions/SpamBlacklist/SpamBlacklist_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SpamBlacklist/SpamBlacklist_body.php
@@ -11,6 +11,7 @@
1212 var $warningTime = 600;
1313 var $expiryTime = 900;
1414 var $warningChance = 100;
 15+ var $ignoreEditSummary = false;
1516
1617 function SpamBlacklist( $settings = array() ) {
1718 foreach ( $settings as $name => $value ) {
@@ -227,7 +228,7 @@
228229 $addedLinks = array_diff( $newLinks, $oldLinks );
229230
230231 // We add the edit summary if one exists
231 - if ( !empty( $editsummary ) ) $addedLinks[] = $editsummary;
 232+ if ( !$this->ignoreEditSummary && !empty( $editsummary ) ) $addedLinks[] = $editsummary;
232233
233234 wfDebugLog( 'SpamBlacklist', "Old URLs: " . implode( ', ', $oldLinks ) );
234235 wfDebugLog( 'SpamBlacklist', "New URLs: " . implode( ', ', $newLinks ) );

Status & tagging log