r109385 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109384‎ | r109385 | r109386 >
Date:16:12, 18 January 2012
Author:rsterbin
Status:resolved (Comments)
Tags:aft 
Comment:
Abuse filtering is now turned off by default, as this feature needs to be on hold a few weeks
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.php
@@ -155,6 +155,18 @@
156156 );
157157
158158 /**
 159+ * Turn on abuse filtering
 160+ *
 161+ * If this is set to true, comments will be run through:
 162+ * 1. $wgSpamRegex, if set
 163+ * 2. SpamBlacklist, if installed
 164+ * 3. AbuseFilter, if installed
 165+ *
 166+ * @var boolean
 167+ */
 168+$wgArticleFeedbackv5AbuseFiltering = false;
 169+
 170+/**
159171 * The full URL for a discussion page about the Article Feedback Dashboard
160172 *
161173 * Since the dashboard is powered by a SpecialPage, we cannot rel on the built-in
Index: trunk/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5.php
@@ -70,7 +70,8 @@
7171 $error = 'articlefeedbackv5-error-validation';
7272 break;
7373 }
74 - if ( 'text' == $type && $this->findAbuse( $value, $pageId ) ) {
 74+ if ( $wgArticleFeedbackv5AbuseFiltering && 'text' == $type
 75+ && $this->findAbuse( $value, $pageId ) ) {
7576 $error = 'articlefeedbackv5-error-abuse';
7677 break;
7778 }
@@ -258,7 +259,7 @@
259260 public function updateFilterCounts( $pageId, $answers ) {
260261 $has_comment = false;
261262
262 - # Does this record have a comment attached?
 263+ # Does this record have a comment attached?
263264 # Defined as an answer of type 'text'.
264265 foreach( $answers as $a ) {
265266 if( $a['aa_response_text'] !== null ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r110059Followup to r109385 - fixed missing global for abuse config flagrsterbin14:01, 26 January 2012

Comments

#Comment by Catrope (talk | contribs)   01:49, 26 January 2012
+				if ( $wgArticleFeedbackv5AbuseFiltering && 'text' == $type

You also need to do global $wgArticleFeedbackv5AbuseFiltering; elsewhere in the function.

#Comment by Rsterbin (talk | contribs)   15:39, 26 January 2012

Fixed in r110059

Status & tagging log