r103272 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103271‎ | r103272 | r103273 >
Date:00:06, 16 November 2011
Author:bsitu
Status:ok
Tags:
Comment:
follow-up to r103251, separate date and time from the language file
Modified paths:
  • /trunk/extensions/MoodBar/MoodBar.i18n.php (modified) (history)
  • /trunk/extensions/MoodBar/SpecialFeedbackDashboard.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/SpecialFeedbackDashboard.php
@@ -250,6 +250,8 @@
251251 * @return string HTML
252252 */
253253 protected static function getHiddenFooter( $feedbackItem, $mode ) {
 254+ global $wgLang, $wgUser;
 255+
254256 $id = $feedbackItem->getProperty('id');
255257 $permalinkTitle = SpecialPage::getTitleFor( 'FeedbackDashboard', $id );
256258 if ( $mode === 'shown' ) {
@@ -260,8 +262,11 @@
261263 $link = Xml::tags( 'span', array( 'class' => 'fbd-item-restore' ), "($link)" );
262264
263265 $feedback_hidden_detail = self::getFeedbackHiddenDetail($id);
 266+ $timestamp = wfTimestamp( TS_DB, $feedback_hidden_detail->log_timestamp );
 267+
264268 $footer = wfMessage('moodbar-hidden-footer')->rawParams( array( htmlspecialchars( $feedback_hidden_detail->log_user_text ),
265 - wfTimestamp( TS_DB, $feedback_hidden_detail->log_timestamp ),
 269+ $wgLang->userDate($timestamp, $wgUser),
 270+ $wgLang->userTime($timestamp, $wgUser),
266271 htmlspecialchars( $feedback_hidden_detail->log_comment ),
267272 $link ) )->escaped();
268273 return Xml::tags( 'div', array( 'class' => 'error' ), $footer );
Index: trunk/extensions/MoodBar/MoodBar.i18n.php
@@ -94,7 +94,7 @@
9595 'moodbar-comment-hidden' => '(Feedback hidden by administrative action)',
9696 'moodbar-feedback-show' => 'show hidden feedback',
9797 'moodbar-feedback-hide' => 'hide feedback',
98 - 'moodbar-hidden-footer' => 'Hidden Feedback by $1 on $2, reason: $3 $4',
 98+ 'moodbar-hidden-footer' => 'Hidden Feedback by $1 on $2 $3, reason: $4 $5',
9999 'moodbar-feedback-restore' => 'restore hidden feedback',
100100 'moodbar-action-item' => 'Feedback item:',
101101 'moodbar-action-reason' => 'Reason:',
@@ -273,7 +273,7 @@
274274 {{Identical|More}}',
275275 'moodbar-feedback-newer' => 'Text of the link that the user can click to go back to more recent results. Only visible if JavaScript is not enabled.',
276276 'moodbar-feedback-older' => 'Text of the link that the user can click to see less recent results. Only visible if JavaScript is not enabled.',
277 - 'moodbar-hidden-footer' => '* $1 is the username, $2 is the time stamp, $3 is the reason for hiding the feedback,$4 is a link to restore the item displaying {{msg-mw|moodbar-feedback-restore}}',
 277+ 'moodbar-hidden-footer' => '* $1 is the username, $2 is the date, $3 is the time, $4 is the reason for hiding the feedback,$5 is a link to restore the item displaying {{msg-mw|moodbar-feedback-restore}}',
278278 'moodbar-type-happy' => '$1 is the username that can be used for GENDER',
279279 'moodbar-type-sad' => '$1 is the username that can be used for GENDER',
280280 'moodbar-type-confused' => '$1 is the username that can be used for GENDER',

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r103251Adding text to indicate which admin at what time hid a feedback along with re...bsitu22:45, 15 November 2011

Status & tagging log