Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.php |
— | — | @@ -155,6 +155,18 @@ |
156 | 156 | ); |
157 | 157 | |
158 | 158 | /** |
| 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 | +/** |
159 | 171 | * The full URL for a discussion page about the Article Feedback Dashboard |
160 | 172 | * |
161 | 173 | * 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 @@ |
71 | 71 | $error = 'articlefeedbackv5-error-validation'; |
72 | 72 | break; |
73 | 73 | } |
74 | | - if ( 'text' == $type && $this->findAbuse( $value, $pageId ) ) { |
| 74 | + if ( $wgArticleFeedbackv5AbuseFiltering && 'text' == $type |
| 75 | + && $this->findAbuse( $value, $pageId ) ) { |
75 | 76 | $error = 'articlefeedbackv5-error-abuse'; |
76 | 77 | break; |
77 | 78 | } |
— | — | @@ -258,7 +259,7 @@ |
259 | 260 | public function updateFilterCounts( $pageId, $answers ) { |
260 | 261 | $has_comment = false; |
261 | 262 | |
262 | | - # Does this record have a comment attached? |
| 263 | + # Does this record have a comment attached? |
263 | 264 | # Defined as an answer of type 'text'. |
264 | 265 | foreach( $answers as $a ) { |
265 | 266 | if( $a['aa_response_text'] !== null ) { |