Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php |
— | — | @@ -90,6 +90,7 @@ |
91 | 91 | 'articlefeedbackv5-form-header' => 'Feedback #$1, at $2', |
92 | 92 | 'articlefeedbackv5-form1-header-found' => '{{GENDER:$1|$1}} found what they were looking for', |
93 | 93 | 'articlefeedbackv5-form1-header-not-found' => '{{GENDER:$1|$1}} did not find what they were looking for', |
| 94 | + 'articlefeedbackv5-form1-header-left-comment' => '{{GENDER:$1|$1}} left a comment', |
94 | 95 | 'articlefeedbackv5-form2-header-praise' => '{{GENDER:$1|$1}} had a praise:', |
95 | 96 | 'articlefeedbackv5-form2-header-problem' => '{{GENDER:$1|$1}} had a problem:', |
96 | 97 | 'articlefeedbackv5-form2-header-question' => '{{GENDER:$1|$1}} had a question:', |
— | — | @@ -100,6 +101,7 @@ |
101 | 102 | 'articlefeedbackv5-form-not-shown' => '{{GENDER:$1|$1}} was not shown a feedback form.', |
102 | 103 | 'articlefeedbackv5-form-invalid' => 'Invalid feedback form ID.', |
103 | 104 | 'articlefeedbackv5-abuse-saved' => 'Flagged as abuse ($1)', |
| 105 | + 'articlefeedbackv5-abuse-saved-masked' => 'Flagged as abuse', |
104 | 106 | 'articlefeedbackv5-oversight-saved' => 'Marked for oversight', |
105 | 107 | 'articlefeedbackv5-unoversight-saved' => 'Oversight flag removed', |
106 | 108 | 'articlefeedbackv5-error-loading-feedback' => 'Error loading feedback', |
— | — | @@ -348,6 +350,8 @@ |
349 | 351 | * $1 is a username.', |
350 | 352 | 'articlefeedbackv5-form1-header-not-found' => 'Parameters |
351 | 353 | * $1 is a username.', |
| 354 | + 'articlefeedbackv5-form1-header-left-comment' => 'Parameters |
| 355 | +* $1 is a username.', |
352 | 356 | 'articlefeedbackv5-form2-header-praise' => 'Parameters: |
353 | 357 | * $1 is a user name.', |
354 | 358 | 'articlefeedbackv5-form2-header-problem' => 'Parameters: |
Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js |
— | — | @@ -495,9 +495,17 @@ |
496 | 496 | // Abusive |
497 | 497 | } else if ( 'abuse' == type ) { |
498 | 498 | if ( dir > 0 ) { |
499 | | - $l.text( mw.msg( 'articlefeedbackv5-abuse-saved', data['articlefeedbackv5-flag-feedback'].abuse_count ) ); |
| 499 | + if( mw.config.get( 'afCanEdit' ) == 1 ) { |
| 500 | + $l.text( mw.msg( 'articlefeedbackv5-abuse-saved', data['articlefeedbackv5-flag-feedback'].abuse_count ) ); |
| 501 | + } else { |
| 502 | + $l.text( mw.msg( 'articlefeedbackv5-abuse-saved-masked', data['articlefeedbackv5-flag-feedback'].abuse_count ) ); |
| 503 | + } |
500 | 504 | } else { |
501 | | - $l.text( mw.msg( 'articlefeedbackv5-form-abuse', data['articlefeedbackv5-flag-feedback'].abuse_count ) ); |
| 505 | + if( mw.config.get( 'afCanEdit' ) == 1 ) { |
| 506 | + $l.text( mw.msg( 'articlefeedbackv5-form-abuse', data['articlefeedbackv5-flag-feedback'].abuse_count ) ); |
| 507 | + } else { |
| 508 | + $l.text( mw.msg( 'articlefeedbackv5-form-abuse-masked', data['articlefeedbackv5-flag-feedback'].abuse_count ) ); |
| 509 | + } |
502 | 510 | } |
503 | 511 | $l.attr( 'rel', data['articlefeedbackv5-flag-feedback'].abuse_count ); |
504 | 512 | if ( data['articlefeedbackv5-flag-feedback'].abusive ) { |
— | — | @@ -594,7 +602,11 @@ |
595 | 603 | } |
596 | 604 | if ( activity.abuse ) { |
597 | 605 | var $l = $( this ).find( '#articleFeedbackv5-abuse-link-' + id ); |
598 | | - $l.text( mw.msg( 'articlefeedbackv5-abuse-saved', $l.attr( 'rel' ) ) ); |
| 606 | + if( mw.config.get( 'afCanEdit' ) == 1 ) { |
| 607 | + $l.text( mw.msg( 'articlefeedbackv5-abuse-saved', $l.attr( 'rel' ) ) ); |
| 608 | + } else { |
| 609 | + $l.text( mw.msg( 'articlefeedbackv5-abuse-saved-masked', $l.attr( 'rel' ) ) ); |
| 610 | + } |
599 | 611 | } |
600 | 612 | } |
601 | 613 | if ( $( this ).hasClass( 'articleFeedbackv5-feedback-hidden' ) ) { |
Index: trunk/extensions/ArticleFeedbackv5/SpecialArticleFeedbackv5.php |
— | — | @@ -57,7 +57,7 @@ |
58 | 58 | * @param $param string the parameter passed in the url |
59 | 59 | */ |
60 | 60 | public function execute( $param ) { |
61 | | - global $wgArticleFeedbackv5DashboardCategory; |
| 61 | + global $wgArticleFeedbackv5DashboardCategory, $wgUser; |
62 | 62 | $out = $this->getOutput(); |
63 | 63 | |
64 | 64 | // set robot policy |
— | — | @@ -185,6 +185,11 @@ |
186 | 186 | # } |
187 | 187 | |
188 | 188 | $out->addJsConfigVars( 'afPageId', $pageId ); |
| 189 | + // Only show the abuse counts to editors (ie, anyone allowed to |
| 190 | + // hide content). |
| 191 | + if ( $wgUser->isAllowed( 'aftv5-see-hidden-feedback' ) ) { |
| 192 | + $out->addJsConfigVars( 'afCanEdit', 1 ); |
| 193 | + } |
189 | 194 | $out->addModules( 'ext.articleFeedbackv5.dashboard' ); |
190 | 195 | |
191 | 196 | $sortLabels = array(); |
Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php |
— | — | @@ -167,7 +167,9 @@ |
168 | 168 | 'articlefeedbackv5-invalid-feedback-id', |
169 | 169 | 'articlefeedbackv5-invalid-feedback-flag', |
170 | 170 | 'articlefeedbackv5-form-abuse', |
| 171 | + 'articlefeedbackv5-form-abuse-masked', |
171 | 172 | 'articlefeedbackv5-abuse-saved', |
| 173 | + 'articlefeedbackv5-abuse-saved-masked', |
172 | 174 | 'articlefeedbackv5-form-hide', |
173 | 175 | 'articlefeedbackv5-form-unhide', |
174 | 176 | 'articlefeedbackv5-form-delete', |