Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php |
— | — | @@ -364,6 +364,9 @@ |
365 | 365 | 'articlefeedbackv5-activity-item-comment' => '$1 $2 $3 : $4', |
366 | 366 | 'articlefeedbackv5-activity-item' => '$1 $2 $3', |
367 | 367 | |
| 368 | + /* Our fake/default user */ |
| 369 | + 'articlefeedbackv5-default-user' => 'Article Feedback V5', |
| 370 | + |
368 | 371 | /* EmailCapture */ |
369 | 372 | 'articlefeedbackv5-emailcapture-response-body' => 'Hello! |
370 | 373 | |
— | — | @@ -683,6 +686,7 @@ |
684 | 687 | * <code>$2</code> – Page name of item with feedback requiring oversight. |
685 | 688 | * <code>$3</code> – URL directly to feedback location |
686 | 689 | * <code>$4</code> – The help link.', |
| 690 | + 'articlefeedbackv5-default-user' => 'The name of the default or internal user who is listed as being the one who autohides feedback for logging and display purposes' |
687 | 691 | ); |
688 | 692 | |
689 | 693 | /** Afrikaans (Afrikaans) |
Index: trunk/extensions/ArticleFeedbackv5/api/ApiFlagFeedbackArticleFeedbackv5.php |
— | — | @@ -48,6 +48,9 @@ |
49 | 49 | // woah, we were not checking for permissions (that could have been script kiddy bad) |
50 | 50 | global $wgUser; |
51 | 51 | |
| 52 | + // we may not actually use this, but don't want to repeat this a million times |
| 53 | + $default_user = wfMessage( 'articlefeedbackv5-default-user' )->text(); |
| 54 | + |
52 | 55 | // we use ONE db connection that talks to master |
53 | 56 | $dbw = wfGetDB( DB_MASTER ); |
54 | 57 | $dbw->begin(); |
— | — | @@ -98,7 +101,7 @@ |
99 | 102 | // tell front-end autohiding was done |
100 | 103 | $results['autohidden'] = 1; |
101 | 104 | // This is data for the "hidden by, oversighted by" red line |
102 | | - $results['hide-user'] = ApiArticleFeedbackv5Utils::getUserLink(null, 'Article Feedback V5'); |
| 105 | + $results['hide-user'] = ApiArticleFeedbackv5Utils::getUserLink(null, $default_user); |
103 | 106 | $results['hide-timestamp'] = wfTimestamp( TS_RFC2822, $timestamp ); |
104 | 107 | } |
105 | 108 | |
— | — | @@ -202,7 +205,7 @@ |
203 | 206 | // tell front-end autohiding was done |
204 | 207 | $results['autohidden'] = 1; |
205 | 208 | // This is data for the "hidden by, oversighted by" red line |
206 | | - $results['hide-user'] = ApiArticleFeedbackv5Utils::getUserLink(null, 'Article Feedback V5'); |
| 209 | + $results['hide-user'] = ApiArticleFeedbackv5Utils::getUserLink(null, $default_user); |
207 | 210 | $results['hide-timestamp'] = wfTimestamp( TS_RFC2822, $timestamp ); |
208 | 211 | } |
209 | 212 | } |
— | — | @@ -250,7 +253,7 @@ |
251 | 254 | // tell front-end autohiding was done |
252 | 255 | $results['autohidden'] = 1; |
253 | 256 | // This is data for the "hidden by, oversighted by" red line |
254 | | - $results['hide-user'] = ApiArticleFeedbackv5Utils::getUserLink(null, 'Article Feedback V5'); |
| 257 | + $results['hide-user'] = ApiArticleFeedbackv5Utils::getUserLink(null, $default_user); |
255 | 258 | $results['hide-timestamp'] = wfTimestamp( TS_RFC2822, $timestamp ); |
256 | 259 | } |
257 | 260 | |
Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php |
— | — | @@ -347,6 +347,7 @@ |
348 | 348 | $can_vote = !$wgUser->isBlocked(); |
349 | 349 | $can_hide = $wgUser->isAllowed( 'aftv5-hide-feedback' ); |
350 | 350 | $can_delete = $wgUser->isAllowed( 'aftv5-delete-feedback' ); |
| 351 | + $default_user = wfMessage( 'articlefeedbackv5-default-user' )->text(); |
351 | 352 | |
352 | 353 | $footer_links = Html::openElement( 'div', array( |
353 | 354 | 'class' => 'articleFeedbackv5-vote-wrapper' |
— | — | @@ -498,12 +499,12 @@ |
499 | 500 | ); |
500 | 501 | if ( $record[0]->af_is_hidden ) { |
501 | 502 | |
502 | | - $attributes['hide-user'] = ApiArticleFeedbackv5Utils::getUserLink($record[0]->af_hide_user_id, 'Article Feedback V5'); |
| 503 | + $attributes['hide-user'] = ApiArticleFeedbackv5Utils::getUserLink($record[0]->af_hide_user_id, $default_user); |
503 | 504 | $attributes['hide-timestamp'] = wfTimestamp( TS_RFC2822, $record[0]->af_hide_timestamp ); |
504 | 505 | } |
505 | 506 | if ( $record[0]->af_is_deleted ) { |
506 | 507 | |
507 | | - $attributes['oversight-user'] = ApiArticleFeedbackv5Utils::getUserLink($record[0]->af_oversight_user_id, 'Article Feedback V5'); |
| 508 | + $attributes['oversight-user'] = ApiArticleFeedbackv5Utils::getUserLink($record[0]->af_oversight_user_id, $default_user); |
508 | 509 | $attributes['oversight-timestamp'] = wfTimestamp( TS_RFC2822, $record[0]->af_oversight_timestamp ); |
509 | 510 | } |
510 | 511 | |
Index: trunk/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5Utils.php |
— | — | @@ -241,7 +241,8 @@ |
242 | 242 | |
243 | 243 | // if this is an automatic action, we create our special extension doer and send |
244 | 244 | if ($auto) { |
245 | | - $doer = User::newFromName( 'Article Feedback V5' ); |
| 245 | + $default_user = wfMessage( 'articlefeedbackv5-default-user' )->text(); |
| 246 | + $doer = User::newFromName( $default_user ); |
246 | 247 | // I cannot see how this could fail, but if it does do not log |
247 | 248 | if (!$doer) { |
248 | 249 | return; |