Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php |
— | — | @@ -81,8 +81,8 @@ |
82 | 82 | 'articlefeedbackv5-special-more' => 'Show more posts', |
83 | 83 | 'articlefeedbackv5-special-pagetitle' => 'Feedback: $1', |
84 | 84 | 'articlefeedbackv5-form-optionid' => 'Option $1', |
85 | | - 'articlefeedbackv5-hidden' => 'This post was hidden by an authorized editor', |
86 | | - 'articlefeedbackv5-deleted' => 'This post was deleted by oversighters', |
| 85 | + 'articlefeedbackv5-hidden' => 'This post was hidden by $1 on $2', |
| 86 | + 'articlefeedbackv5-deleted' => 'This post was deleted by $1 on $2', |
87 | 87 | 'articlefeedbackv5-form-hide' => 'Hide this post', |
88 | 88 | 'articlefeedbackv5-form-unhide' => 'Unhide this post', |
89 | 89 | 'articlefeedbackv5-form-helpful' => 'Mark as helpful ($1)', |
Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js |
— | — | @@ -476,7 +476,7 @@ |
477 | 477 | $row.addClass( 'articleFeedbackv5-feedback-hidden' ) |
478 | 478 | .data( 'hidden', true ); |
479 | 479 | $( '<span class="articleFeedbackv5-feedback-hidden-marker"></span>' ) |
480 | | - .text( mw.msg( 'articlefeedbackv5-hidden' ) ) |
| 480 | + .text( mw.msg( 'articlefeedbackv5-hidden', $row.data('hide-user'), $row.data('hide-timestamp')) ) |
481 | 481 | .insertBefore( $row.find( '.articleFeedbackv5-comment-wrap h3' ) ); |
482 | 482 | $.articleFeedbackv5special.maskPost( $row ); |
483 | 483 | }; |
— | — | @@ -523,7 +523,7 @@ |
524 | 524 | $row.addClass( 'articleFeedbackv5-feedback-deleted' ) |
525 | 525 | .data( 'deleted', true ); |
526 | 526 | var $marker = $( '<span class="articleFeedbackv5-feedback-deleted-marker"></span>' ) |
527 | | - .text( mw.msg( 'articlefeedbackv5-deleted' ) ) |
| 527 | + .text( mw.msg( 'articlefeedbackv5-deleted', $row.data('oversight-user'), $row.data('oversight-timestamp') ) ) |
528 | 528 | .insertBefore( $row.find( '.articleFeedbackv5-comment-wrap h3' ) ); |
529 | 529 | $.articleFeedbackv5special.maskPost( $row ); |
530 | 530 | }; |
— | — | @@ -1033,6 +1033,10 @@ |
1034 | 1034 | .text( mw.msg( 'articlefeedbackv5-form-unhide' ) ) |
1035 | 1035 | .removeClass( 'articleFeedbackv5-hide-link' ) |
1036 | 1036 | .addClass( 'articleFeedbackv5-show-link' ); |
| 1037 | + |
| 1038 | + $link.data( 'hide-user', data['articlefeedbackv5-flag-feedback']['hide-user']); |
| 1039 | + $link.data( 'hide-timestamp', data['articlefeedbackv5-flag-feedback']['hide-timestamp']); |
| 1040 | + |
1037 | 1041 | $.articleFeedbackv5special.markHidden( $link.closest( '.articleFeedbackv5-feedback' ) ); |
1038 | 1042 | $.articleFeedbackv5special.setActivityFlag( id, 'hide', true ); |
1039 | 1043 | } |
— | — | @@ -1108,6 +1112,10 @@ |
1109 | 1113 | .text( mw.msg( 'articlefeedbackv5-form-undelete' ) ) |
1110 | 1114 | .removeClass( 'articleFeedbackv5-oversight-link' ) |
1111 | 1115 | .addClass( 'articleFeedbackv5-unoversight-link' ); |
| 1116 | + |
| 1117 | + $link.data( 'oversight-user', data['articlefeedbackv5-flag-feedback']['oversight-user']); |
| 1118 | + $link.data( 'oversight-timestamp', data['articlefeedbackv5-flag-feedback']['oversight-timestamp']); |
| 1119 | + |
1112 | 1120 | $.articleFeedbackv5special.markDeleted( $link.closest( '.articleFeedbackv5-feedback' ) ); |
1113 | 1121 | $.articleFeedbackv5special.setActivityFlag( id, 'delete', true ); |
1114 | 1122 | } |
Index: trunk/extensions/ArticleFeedbackv5/api/ApiFlagFeedbackArticleFeedbackv5.php |
— | — | @@ -82,9 +82,9 @@ |
83 | 83 | $filters['undeleted'] = -1; |
84 | 84 | } |
85 | 85 | |
86 | | - // TODO: This is data for the "hidden by, oversighted by" red line |
87 | | - $results['oversight_user'] = $wgUser->getId(); |
88 | | - $results['oversight_timestamp'] = $timestamp; |
| 86 | + // This is data for the "hidden by, oversighted by" red line |
| 87 | + $results['oversight-user'] = $wgUser->getName(); |
| 88 | + $results['oversight-timestamp'] = wfTimestamp( TS_RFC2822, $timestamp ); |
89 | 89 | |
90 | 90 | // autohide if not hidden |
91 | 91 | if (false == $record->af_is_hidden ) { |
— | — | @@ -97,9 +97,9 @@ |
98 | 98 | $implicit_hide = true; // for logging |
99 | 99 | // tell front-end autohiding was done |
100 | 100 | $results['autohidden'] = 1; |
101 | | - // TODO: This is data for the "hidden by, oversighted by" red line |
102 | | - $results['hide_user'] = 0; |
103 | | - $results['hide_timestamp'] = $timestamp; |
| 101 | + // This is data for the "hidden by, oversighted by" red line |
| 102 | + $results['hide-user'] = 'Article Feedback V5'; |
| 103 | + $results['hide-timestamp'] = wfTimestamp( TS_RFC2822, $timestamp ); |
104 | 104 | } |
105 | 105 | |
106 | 106 | } else { |
— | — | @@ -129,9 +129,9 @@ |
130 | 130 | $update['af_hide_timestamp'] = $timestamp; |
131 | 131 | $filters = $this->changeFilterCounts( $record, $filters, 'hide' ); |
132 | 132 | |
133 | | - // TODO: This is data for the "hidden by, oversighted by" red line |
134 | | - $results['hide_user'] = $wgUser->getId(); |
135 | | - $results['hide_timestamp'] = $timestamp; |
| 133 | + // This is data for the "hidden by, oversighted by" red line |
| 134 | + $results['hide-user'] = $wgUser->getName(); |
| 135 | + $results['hide-timestamp'] = wfTimestamp( TS_RFC2822, $timestamp ); |
136 | 136 | |
137 | 137 | } else { |
138 | 138 | // decrease means "unhide this" |
— | — | @@ -201,9 +201,9 @@ |
202 | 202 | |
203 | 203 | // tell front-end autohiding was done |
204 | 204 | $results['autohidden'] = 1; |
205 | | - // TODO: This is data for the "hidden by, oversighted by" red line |
206 | | - $results['hide_user'] = 0; |
207 | | - $results['hide_timestamp'] = $timestamp; |
| 205 | + // This is data for the "hidden by, oversighted by" red line |
| 206 | + $results['hide-user'] = 'Article Feedback V5'; |
| 207 | + $results['hide-timestamp'] = wfTimestamp( TS_RFC2822, $timestamp ); |
208 | 208 | } |
209 | 209 | } |
210 | 210 | |
— | — | @@ -249,9 +249,9 @@ |
250 | 250 | $implicit_hide = true; // for logging |
251 | 251 | // tell front-end autohiding was done |
252 | 252 | $results['autohidden'] = 1; |
253 | | - // TODO: This is data for the "hidden by, oversighted by" red line |
254 | | - $results['hide_user'] = 0; |
255 | | - $results['hide_timestamp'] = $timestamp; |
| 253 | + // This is data for the "hidden by, oversighted by" red line |
| 254 | + $results['hide-user'] = 'Article Feedback V5'; |
| 255 | + $results['hide-timestamp'] = wfTimestamp( TS_RFC2822, $timestamp ); |
256 | 256 | } |
257 | 257 | |
258 | 258 | // IF the previous setting was 0, send an email |
Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php |
— | — | @@ -508,9 +508,9 @@ |
509 | 509 | $name = 'Article Feedback V5'; |
510 | 510 | } |
511 | 511 | |
512 | | - $attributes['hide_user'] = $name; |
| 512 | + $attributes['data-hide-user'] = $name; |
513 | 513 | if ($record[0]->af_hide_timestamp > 0) { |
514 | | - $attributes['hide_timestamp'] = wfTimestamp( TS_RFC2822, $record[0]->af_hide_timestamp ); |
| 514 | + $attributes['data-hide-timestamp'] = wfTimestamp( TS_RFC2822, $record[0]->af_hide_timestamp ); |
515 | 515 | } |
516 | 516 | } |
517 | 517 | if ( $record[0]->af_is_deleted ) { |
— | — | @@ -525,9 +525,9 @@ |
526 | 526 | $name = 'Article Feedback V5'; |
527 | 527 | } |
528 | 528 | |
529 | | - $attributes['oversight_user'] = $name; |
| 529 | + $attributes['data-oversight-user'] = $name; |
530 | 530 | if ($record[0]->af_oversight_timestamp > 0) { |
531 | | - $attributes['oversight_timestamp'] = wfTimestamp( TS_RFC2822, $record[0]->af_oversight_timestamp ); |
| 531 | + $attributes['data-oversight-timestamp'] = wfTimestamp( TS_RFC2822, $record[0]->af_oversight_timestamp ); |
532 | 532 | } |
533 | 533 | } |
534 | 534 | |