r48853 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48852‎ | r48853 | r48854 >
Date:03:27, 26 March 2009
Author:werdna
Status:ok
Tags:
Comment:
Fix blocked status display, was broken for indef blocks since r48057.
Modified paths:
  • /trunk/extensions/CentralAuth/CentralAuth.i18n.php (modified) (history)
  • /trunk/extensions/CentralAuth/SpecialCentralAuth.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralAuth/SpecialCentralAuth.php
@@ -340,13 +340,18 @@
341341
342342 function showBlockStatus( $row ) {
343343 if ($row['blocked']) {
344 - global $wgLang;
345 - $expiry = $wgLang->timeanddate( $row['block-expiry'] );
346 - $expiryd = $wgLang->date( $row['block-expiry'] );
347 - $expiryt = $wgLang->time( $row['block-expiry'] );
 344+ if ($row['block-expiry'] == 'infinity') {
348345 $reason = $row['block-reason'];
349 -
350 - return wfMsgExt( 'centralauth-admin-blocked', 'parseinline', array( $expiry, $reason, $expiryd, $expiryt ) );
 346+ return wfMsgExt( 'centralauth-admin-blocked-indef', 'parseinline', array( $reason ) );
 347+ } else {
 348+ global $wgLang;
 349+ $expiry = $wgLang->timeanddate( $row['block-expiry'] );
 350+ $expiryd = $wgLang->date( $row['block-expiry'] );
 351+ $expiryt = $wgLang->time( $row['block-expiry'] );
 352+ $reason = $row['block-reason'];
 353+
 354+ return wfMsgExt( 'centralauth-admin-blocked', 'parseinline', array( $expiry, $reason, $expiryd, $expiryt ) );
 355+ }
351356 } else {
352357 return wfMsgExt( 'centralauth-admin-notblocked', 'parseinline' );
353358 }
Index: trunk/extensions/CentralAuth/CentralAuth.i18n.php
@@ -140,7 +140,8 @@
141141 'centralauth-admin-unattached' => 'Unattached accounts',
142142 'centralauth-admin-no-unattached' => 'No unmerged accounts remain.',
143143 'centralauth-admin-notblocked' => 'Not blocked',
144 - 'centralauth-admin-blocked' => 'Blocked with expiry on $3 at $4. Reason: $2',
 144+ 'centralauth-admin-blocked' => 'Blocked, expires $3 at $4. Reason: $2',
 145+ 'centralauth-admin-blocked-indef' => 'Blocked indefinitely. Reason: $1',
145146 'centralauth-admin-list-localwiki' => 'Local wiki',
146147 'centralauth-admin-list-attached-on' => 'Attached on',
147148 'centralauth-admin-list-method' => 'Method',

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r48057Use date and time separately in UI sentence 'centralauth-admin-blocked'siebrand09:02, 5 March 2009

Status & tagging log