r41363 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41362‎ | r41363 | r41364 >
Date:20:35, 28 September 2008
Author:vasilievvv
Status:old (Comments)
Tags:
Comment:
Split time and date in messages.
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialListUserRestrictions.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialListUserRestrictions.php
@@ -134,7 +134,7 @@
135135 $subjlink = $sk->userLink( $r->getSubjectId(), $r->getSubjectText() ) .
136136 $sk->userToolLinks( $r->getSubjectId(), $r->getSubjectText() );
137137 $expiry = is_numeric( $r->getExpiry() ) ?
138 - wfMsg( 'listuserrestrictions-row-expiry', $wgLang->timeanddate( $r->getExpiry() ) ) :
 138+ wfMsg( 'listuserrestrictions-row-expiry', $wgLang->date( $r->getExpiry() ), $wgLang->time( $r->getExpiry() ) ) :
139139 wfMsg( 'ipbinfinite' );
140140 $msg = '';
141141 if( $r->isNamespace() ) {
Index: trunk/phase3/includes/Title.php
@@ -1327,17 +1327,22 @@
13281328 if( !$r )
13291329 $r = $user->getRestrictionForNamespace( $this->getNamespace() );
13301330 if( $r ) {
1331 - $start = $wgLang->timeanddate( $r->getTimestamp() );
1332 - $end = $r->getExpiry() == 'infinity' ?
1333 - wfMsg( 'ipbinfinite' ) :
1334 - $wgLang->timeanddate( $r->getExpiry() );
 1331+ $error = array();
 1332+ $start = array( $wgLang->date( $r->getTimestamp() ), $wgLang->time( $r->getTimestamp() ) );
13351333 if( $r->isPage() )
1336 - $errors[] = array( 'userrestricted-page', $this->getFullText(),
1337 - $r->getBlockerText(), $r->getReason(), $start, $end );
1338 - elseif( $r->isNamespace() ) {
1339 - $errors[] = array( 'userrestricted-namespace', $wgLang->getDisplayNsText( $this->getNamespace() ),
1340 - $r->getBlockerText(), $r->getReason(), $start, $end );
 1334+ $error = array( 'userrestricted-page', $this->getFullText(),
 1335+ $r->getBlockerText(), $r->getReason(), $start[0], $start[1] );
 1336+ elseif( $r->isNamespace() )
 1337+ $error = array( 'userrestricted-namespace', $wgLang->getDisplayNsText( $this->getNamespace() ),
 1338+ $r->getBlockerText(), $r->getReason(), $start[0], $start[1] );
 1339+
 1340+ if( $r->getExpiry() == 'infinity' ) {
 1341+ $error[0] .= '-indef';
 1342+ } else {
 1343+ $error[] = $wgLang->date( $r->getExpiry() );
 1344+ $error[] = $wgLang->time( $r->getExpiry() );
13411345 }
 1346+ $errors[] = $error;
13421347 }
13431348 }
13441349
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1205,7 +1205,7 @@
12061206 The restriction was put by [[User:$2|$2]].
12071207 The reason given is \'\'$3\'\'.
12081208
1209 -Restriction was put at $4 and expires at $5.
 1209+Restriction was put on $4 at $5 and expires on $6 at $7.
12101210
12111211 You can contact [[User:$2|$2]] or another [[{{MediaWiki:Grouppage-sysop}}|administrator]] to discuss the restriction.',
12121212 'userrestricted-namespace' => "<big>'''Your user name or IP address has been restricted from editing $1 namespace.'''</big>
@@ -1213,10 +1213,26 @@
12141214 The restriction was put by [[User:$2|$2]].
12151215 The reason given is ''$3''.
12161216
1217 -Restriction was put at $4 and expires at $5.
 1217+Restriction was put on $4 at $5 and expires on $6 at $7.
12181218
12191219 You can contact [[User:$2|$2]] or another [[{{MediaWiki:Grouppage-sysop}}|administrator]] to discuss the restriction.",
 1220+'userrestricted-page-indef' => '<big>\'\'\'Your user name or IP address has been restricted from editing page "$1".\'\'\'</big>
12201221
 1222+The restriction was put by [[User:$2|$2]].
 1223+The reason given is \'\'$3\'\'.
 1224+
 1225+Restriction was put at $4 and will not expire.
 1226+
 1227+You can contact [[User:$2|$2]] or another [[{{MediaWiki:Grouppage-sysop}}|administrator]] to discuss the restriction.',
 1228+'userrestricted-namespace-indef' => "<big>'''Your user name or IP address has been restricted from editing $1 namespace.'''</big>
 1229+
 1230+The restriction was put by [[User:$2|$2]].
 1231+The reason given is ''$3''.
 1232+
 1233+Restriction was put at $4 and will not expire.
 1234+
 1235+You can contact [[User:$2|$2]] or another [[{{MediaWiki:Grouppage-sysop}}|administrator]] to discuss the restriction.",
 1236+
12211237 # Parser/template warnings
12221238 'expensive-parserfunction-warning' => 'Warning: This page contains too many expensive parser function calls.
12231239
@@ -2596,7 +2612,7 @@
25972613 [[Special:Ipblocklist|Blocks]] are not listed here.',
25982614 'listuserrestrictions-row-ns' => 'restricted $1 from editing $2 namespace ($3)',
25992615 'listuserrestrictions-row-page' => 'restricted $1 from editing $2 ($3)',
2600 -'listuserrestrictions-row-expiry' => 'expires at $1',
 2616+'listuserrestrictions-row-expiry' => 'expires on $1 at $2',
26012617 'listuserrestrictions-legend' => 'Find a restriction',
26022618 'listuserrestrictions-type' => 'Type:',
26032619 'listuserrestrictions-user' => 'User:',

Comments

#Comment by Brion VIBBER (talk | contribs)   20:42, 30 September 2008

Backed out in r41405: unauthorized schema changes break parser tests, etc

Status & tagging log