Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php |
— | — | @@ -82,6 +82,7 @@ |
83 | 83 | 'articlefeedbackv5-form-unhide' => 'Show this post', |
84 | 84 | 'articlefeedbackv5-form-helpful' => 'Mark as helpful ($1)', |
85 | 85 | 'articlefeedbackv5-form-abuse' => 'Flag as abuse ($1)', |
| 86 | + 'articlefeedbackv5-form-abuse-masked' => 'Flag as abuse', |
86 | 87 | 'articlefeedbackv5-form-delete' => 'Delete (oversight)', |
87 | 88 | 'articlefeedbackv5-form-oversight' => 'Request oversight', |
88 | 89 | 'articlefeedbackv5-form-unoversight' => 'Unmark for oversight', |
— | — | @@ -334,6 +335,8 @@ |
335 | 336 | * $1 is the title of the article for which we show the feedback', |
336 | 337 | 'articlefeedbackv5-hidden' => '{{Identical|Hidden}}', |
337 | 338 | 'articlefeedbackv5-deleted' => 'The marker that appears on a comment if it has been deleted by an oversighter.', |
| 339 | + 'articlefeedbackv5-form-abuse' => 'Link text allowing the user to flag feedback as abuse. $1 is the number of times the feedback has been flagged previously.', |
| 340 | + 'articlefeedbackv5-form-abuse-masked' => 'Link text allowing the user to flag feedback as abuse, without the count included in {{msg-mw|articlefeedbackv5-form-abuse}}', |
338 | 341 | 'articlefeedbackv5-form-delete' => '{{Identical|Delete}}', |
339 | 342 | 'articlefeedbackv5-form-oversight' => 'Request that an oversighter review this feedback', |
340 | 343 | 'articlefeedbackv5-form-unoversight' => 'Remove request for oversight', |
Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php |
— | — | @@ -198,24 +198,24 @@ |
199 | 199 | __METHOD__, |
200 | 200 | array( 'ORDER BY' => $order ), |
201 | 201 | array( |
202 | | - 'rating' => array( |
203 | | - 'LEFT JOIN', |
204 | | - 'rating.aa_feedback_id = af_id AND rating.aa_field_id = '.intval( $ratingField ) |
| 202 | + 'rating' => array( |
| 203 | + 'LEFT JOIN', |
| 204 | + 'rating.aa_feedback_id = af_id AND rating.aa_field_id = ' . intval( $ratingField ) |
205 | 205 | ), |
206 | | - 'answer' => array( |
| 206 | + 'answer' => array( |
207 | 207 | 'LEFT JOIN', 'af_id = answer.aa_feedback_id' |
208 | 208 | ), |
209 | | - 'aft_article_field' => array( |
| 209 | + 'aft_article_field' => array( |
210 | 210 | 'LEFT JOIN', 'afi_id = answer.aa_field_id' |
211 | 211 | ), |
212 | 212 | 'aft_article_field_option' => array( |
213 | 213 | 'LEFT JOIN', |
214 | 214 | 'answer.aa_response_option_id = afo_option_id' |
215 | 215 | ), |
216 | | - 'user' => array( |
| 216 | + 'user' => array( |
217 | 217 | 'LEFT JOIN', 'user_id = af_user_id' |
218 | 218 | ), |
219 | | - 'page' => array( |
| 219 | + 'page' => array( |
220 | 220 | 'JOIN', 'page_id = af_page_id' |
221 | 221 | ) |
222 | 222 | ) |
— | — | @@ -258,7 +258,7 @@ |
259 | 259 | $where['af_is_deleted'] = 0; |
260 | 260 | } |
261 | 261 | |
262 | | - switch( $filter ) { |
| 262 | + switch ( $filter ) { |
263 | 263 | case 'needsoversight': |
264 | 264 | $where[] = 'af_needs_oversight IS TRUE'; |
265 | 265 | break; |
— | — | @@ -361,11 +361,13 @@ |
362 | 362 | if ( $record[0]->af_abuse_count >= $wgArticleFeedbackv5AbusiveThreshold ) { |
363 | 363 | $aclass .= ' abusive'; |
364 | 364 | } |
| 365 | + // Count masked if user cannot hide comments (as per Fabrice) |
| 366 | + $msg = $can_hide ? 'articlefeedbackv5-form-abuse' : 'articlefeedbackv5-form-abuse-masked'; |
365 | 367 | $footer_links .= Html::element( 'a', array( |
366 | 368 | 'id' => "articleFeedbackv5-abuse-link-$id", |
367 | 369 | 'class' => $aclass, |
368 | 370 | 'rel' => $record[0]->af_abuse_count |
369 | | - ), wfMessage( 'articlefeedbackv5-form-abuse', $record[0]->af_abuse_count )->text() ); |
| 371 | + ), wfMessage( $msg, $record[0]->af_abuse_count )->text() ); |
370 | 372 | } |
371 | 373 | $footer_links .= $details . Html::closeElement( 'div' ); |
372 | 374 | |