Index: trunk/extensions/CentralAuth/ApiQueryGlobalUserInfo.php |
— | — | @@ -87,7 +87,7 @@ |
88 | 88 | ); |
89 | 89 | if ( $account['blocked'] ) { |
90 | 90 | $a['blocked'] = array( |
91 | | - 'expiry' => Block::decodeExpiry( $account['block-expiry'], TS_ISO_8601 ), |
| 91 | + 'expiry' => $this->getLanguage()->formatExpiry( $account['block-expiry'], TS_ISO_8601 ), |
92 | 92 | 'reason' => $account['block-reason'] |
93 | 93 | ); |
94 | 94 | } |
— | — | @@ -104,7 +104,7 @@ |
105 | 105 | ); |
106 | 106 | if ( $account['blocked'] ) { |
107 | 107 | $a['blocked'] = array( |
108 | | - 'expiry' => Block::decodeExpiry( $account['block-expiry'], TS_ISO_8601 ), |
| 108 | + 'expiry' => $this->getLanguage()->formatExpiry( $account['block-expiry'], TS_ISO_8601 ), |
109 | 109 | 'reason' => $account['block-reason'] |
110 | 110 | ); |
111 | 111 | } |
Index: trunk/extensions/CentralAuth/CentralAuthUser.php |
— | — | @@ -48,6 +48,9 @@ |
49 | 49 | const HIDDEN_LISTS = 'lists'; |
50 | 50 | const HIDDEN_OVERSIGHT = 'suppressed'; |
51 | 51 | |
| 52 | + /** |
| 53 | + * @param $username string |
| 54 | + */ |
52 | 55 | function __construct( $username ) { |
53 | 56 | $this->mName = $username; |
54 | 57 | $this->resetState(); |
— | — | @@ -1167,7 +1170,7 @@ |
1168 | 1171 | /* $reason */ $blockReason, |
1169 | 1172 | /* $timestamp */ wfTimestampNow(), |
1170 | 1173 | /* $auto */ false, |
1171 | | - /* $expiry */ Block::infinity(), |
| 1174 | + /* $expiry */ $dbw->getInfinity(), |
1172 | 1175 | /* anonOnly */ false, |
1173 | 1176 | /* $createAccount */ true, |
1174 | 1177 | /* $enableAutoblock */ true, |
Index: trunk/extensions/CentralAuth/specials/SpecialGlobalGroupMembership.php |
— | — | @@ -103,7 +103,7 @@ |
104 | 104 | |
105 | 105 | /** |
106 | 106 | * @param $user User |
107 | | - * @param $output |
| 107 | + * @param $output OutputPage |
108 | 108 | */ |
109 | 109 | protected function showLogFragment( $user, $output ) { |
110 | 110 | $pageTitle = Title::makeTitleSafe( NS_USER, $user->getName() ); |
Index: trunk/extensions/CentralAuth/specials/SpecialGlobalGroupPermissions.php |
— | — | @@ -123,7 +123,7 @@ |
124 | 124 | if ( $editable ) { |
125 | 125 | $html .= Xml::openElement( 'form', array( 'method' => 'post', 'action' => SpecialPage::getTitleFor( 'GlobalGroupPermissions', $group )->getLocalUrl(), 'name' => 'centralauth-globalgroups-newgroup' ) ); |
126 | 126 | $html .= Html::hidden( 'wpGroup', $group ); |
127 | | - $html .= Html::hidden( 'wpEditToken', $this->getUser()->editToken() ); |
| 127 | + $html .= Html::hidden( 'wpEditToken', $this->getUser()->getEditToken() ); |
128 | 128 | } |
129 | 129 | |
130 | 130 | $fields = array(); |
— | — | @@ -323,7 +323,7 @@ |
324 | 324 | |
325 | 325 | /** |
326 | 326 | * @param $group |
327 | | - * @param $output |
| 327 | + * @param $output OutputPage |
328 | 328 | */ |
329 | 329 | protected function showLogFragment( $group, $output ) { |
330 | 330 | $title = SpecialPage::getTitleFor( 'GlobalUsers', $group ); |
Index: trunk/extensions/CentralAuth/specials/SpecialCentralAuth.php |
— | — | @@ -328,7 +328,7 @@ |
329 | 329 | $this->getTitle( $this->mUserName )->getLocalUrl( 'action=submit' ), |
330 | 330 | 'id' => 'mw-centralauth-merged' ) ) . |
331 | 331 | Html::hidden( 'wpMethod', 'unmerge' ) . |
332 | | - Html::hidden( 'wpEditToken', $this->getUser()->editToken() ) . |
| 332 | + Html::hidden( 'wpEditToken', $this->getUser()->getEditToken() ) . |
333 | 333 | Xml::openElement( 'table', array( 'class' => 'wikitable sortable mw-centralauth-wikislist' ) ) . "\n" . |
334 | 334 | '<thead><tr>' . |
335 | 335 | ( $this->mCanUnmerge ? '<th></th>' : '' ) . |
— | — | @@ -570,7 +570,7 @@ |
571 | 571 | 'action' => $this->getTitle()->getFullUrl( 'target=' . urlencode( $this->mUserName ) ), |
572 | 572 | 'id' => "mw-centralauth-$action" ) ) . |
573 | 573 | Html::hidden( 'wpMethod', $action ) . |
574 | | - Html::hidden( 'wpEditToken', $this->getUser()->editToken() ) . |
| 574 | + Html::hidden( 'wpEditToken', $this->getUser()->getEditToken() ) . |
575 | 575 | wfMsgExt( "centralauth-admin-{$action}-description", 'parse' ) . |
576 | 576 | Xml::buildForm( |
577 | 577 | array( 'centralauth-admin-reason' => Xml::input( 'reason', |
— | — | @@ -585,7 +585,7 @@ |
586 | 586 | $form = ''; |
587 | 587 | $form .= Xml::fieldset( wfMsg( 'centralauth-admin-status' ) ); |
588 | 588 | $form .= Html::hidden( 'wpMethod', 'set-status' ); |
589 | | - $form .= Html::hidden( 'wpEditToken', $this->getUser()->editToken() ); |
| 589 | + $form .= Html::hidden( 'wpEditToken', $this->getUser()->getEditToken() ); |
590 | 590 | $form .= wfMsgExt( 'centralauth-admin-status-intro', 'parse' ); |
591 | 591 | |
592 | 592 | // Radio buttons |
Index: trunk/extensions/CentralAuth/specials/SpecialMergeAccount.php |
— | — | @@ -94,7 +94,6 @@ |
95 | 95 | * data, so they won't be found floating in the same place. |
96 | 96 | */ |
97 | 97 | private function initSession() { |
98 | | - global $wgUser; |
99 | 98 | $this->mSessionToken = $this->getUser()->generateToken(); |
100 | 99 | |
101 | 100 | // Generate a random binary string |
— | — | @@ -219,7 +218,7 @@ |
220 | 219 | } |
221 | 220 | |
222 | 221 | function doInitialMerge() { |
223 | | - global $wgUser, $wgCentralAuthDryRun; |
| 222 | + global $wgCentralAuthDryRun; |
224 | 223 | $globalUser = new CentralAuthUser( $this->getUser()->getName() ); |
225 | 224 | |
226 | 225 | if ( $wgCentralAuthDryRun ) { |
— | — | @@ -326,7 +325,6 @@ |
327 | 326 | } |
328 | 327 | |
329 | 328 | function showCleanupForm() { |
330 | | - global $wgUser; |
331 | 329 | $globalUser = new CentralAuthUser( $this->getUser()->getName() ); |
332 | 330 | |
333 | 331 | $merged = $globalUser->listAttached(); |
— | — | @@ -467,7 +465,6 @@ |
468 | 466 | * @return string |
469 | 467 | */ |
470 | 468 | private function actionForm( $action, $title, $text ) { |
471 | | - global $wgUser; |
472 | 469 | return |
473 | 470 | '<div id="userloginForm">' . |
474 | 471 | Xml::openElement( 'form', |
— | — | @@ -475,7 +472,7 @@ |
476 | 473 | 'method' => 'post', |
477 | 474 | 'action' => $this->getTitle()->getLocalUrl( 'action=submit' ) ) ) . |
478 | 475 | Xml::element( 'h2', array(), $title ) . |
479 | | - Html::hidden( 'wpEditToken', $this->getUser()->editToken() ) . |
| 476 | + Html::hidden( 'wpEditToken', $this->getUser()->getEditToken() ) . |
480 | 477 | Html::hidden( 'wpMergeAction', $action ) . |
481 | 478 | Html::hidden( 'wpMergeSessionToken', $this->mSessionToken ) . |
482 | 479 | Html::hidden( 'wpMergeSessionKey', bin2hex( $this->mSessionKey ) ) . |
— | — | @@ -542,7 +539,6 @@ |
543 | 540 | * @return string |
544 | 541 | */ |
545 | 542 | private function step2PasswordForm( $unattached ) { |
546 | | - global $wgUser; |
547 | 543 | return $this->passwordForm( |
548 | 544 | 'dryrun', |
549 | 545 | wfMsg( 'centralauth-merge-step2-title' ), |
— | — | @@ -558,7 +554,6 @@ |
559 | 555 | * @return string |
560 | 556 | */ |
561 | 557 | private function step3ActionForm( $home, $attached, $methods ) { |
562 | | - global $wgUser; |
563 | 558 | return $this->actionForm( |
564 | 559 | 'initial', |
565 | 560 | wfMsg( 'centralauth-merge-step3-title' ), |
Index: trunk/extensions/CentralAuth/specials/SpecialWikiSets.php |
— | — | @@ -167,7 +167,7 @@ |
168 | 168 | |
169 | 169 | $this->getOutput()->addHTML( Xml::buildForm( $form, 'centralauth-editset-submit' ) ); |
170 | 170 | |
171 | | - $edittoken = Html::hidden( 'wpEditToken', $this->getUser()->editToken() ); |
| 171 | + $edittoken = Html::hidden( 'wpEditToken', $this->getUser()->getEditToken() ); |
172 | 172 | $this->getOutput()->addHTML( "<p>{$edittoken}</p></form></fieldset>" ); |
173 | 173 | } else { |
174 | 174 | $form = array(); |
— | — | @@ -220,7 +220,7 @@ |
221 | 221 | $i++; |
222 | 222 | } |
223 | 223 | $body = ''; |
224 | | - foreach( $splitLists as $column => $splitList ) { |
| 224 | + foreach( $splitLists as $splitList ) { |
225 | 225 | $body .= '<td width="' . round( 100 / $columns ) . '%"><ul>'; |
226 | 226 | foreach( $splitList as $listitem ) { |
227 | 227 | $body .= Html::element( 'li', array(), $listitem ); |
— | — | @@ -250,7 +250,7 @@ |
251 | 251 | $legend = wfMsgHtml( 'centralauth-editset-legend-delete', $set->getName() ); |
252 | 252 | $form = array( 'centralauth-editset-reason' => Xml::input( 'wpReason' ) ); |
253 | 253 | $url = htmlspecialchars( SpecialPage::getTitleFor( 'WikiSets', "delete/{$subpage}" )->getLocalUrl() ); |
254 | | - $edittoken = Html::hidden( 'wpEditToken', $this->getUser()->editToken() ); |
| 254 | + $edittoken = Html::hidden( 'wpEditToken', $this->getUser()->getEditToken() ); |
255 | 255 | |
256 | 256 | $this->getOutput()->addHTML( "<fieldset><legend>{$legend}</legend><form action='{$url}' method='post'>" ); |
257 | 257 | $this->getOutput()->addHTML( Xml::buildForm( $form, 'centralauth-editset-submit-delete' ) ); |