Index: trunk/phase3/includes/Preferences.php |
— | — | @@ -131,7 +131,7 @@ |
132 | 132 | * @return void |
133 | 133 | */ |
134 | 134 | static function profilePreferences( $user, &$defaultPreferences ) { |
135 | | - global $wgLang, $wgUser; |
| 135 | + global $wgLang; |
136 | 136 | ## User info ##################################### |
137 | 137 | // Information panel |
138 | 138 | $defaultPreferences['username'] = array( |
— | — | @@ -224,7 +224,7 @@ |
225 | 225 | ); |
226 | 226 | |
227 | 227 | if ( $wgAuth->allowPasswordChange() ) { |
228 | | - $link = $wgUser->getSkin()->link( SpecialPage::getTitleFor( 'ChangePassword' ), |
| 228 | + $link = Linker::link( SpecialPage::getTitleFor( 'ChangePassword' ), |
229 | 229 | wfMsgHtml( 'prefs-resetpass' ), array(), |
230 | 230 | array( 'returnto' => SpecialPage::getTitleFor( 'Preferences' ) ) ); |
231 | 231 | |
— | — | @@ -353,7 +353,7 @@ |
354 | 354 | $helpMessages[] = 'prefs-help-email-others'; |
355 | 355 | } |
356 | 356 | |
357 | | - $link = $wgUser->getSkin()->link( |
| 357 | + $link = Linker::link( |
358 | 358 | SpecialPage::getTitleFor( 'ChangeEmail' ), |
359 | 359 | wfMsgHtml( $user->getEmail() ? 'prefs-changeemail' : 'prefs-setemail' ), |
360 | 360 | array(), |
— | — | @@ -389,14 +389,10 @@ |
390 | 390 | $disableEmailPrefs = false; |
391 | 391 | } else { |
392 | 392 | $disableEmailPrefs = true; |
393 | | - $skin = $wgUser->getSkin(); |
394 | 393 | $emailauthenticated = wfMsgExt( 'emailnotauthenticated', 'parseinline' ) . '<br />' . |
395 | | - $skin->link( |
| 394 | + Linker::linkKnown( |
396 | 395 | SpecialPage::getTitleFor( 'Confirmemail' ), |
397 | | - wfMsg( 'emailconfirmlink' ), |
398 | | - array(), |
399 | | - array(), |
400 | | - array( 'known', 'noclasses' ) |
| 396 | + wfMsg( 'emailconfirmlink' ) |
401 | 397 | ) . '<br />'; |
402 | 398 | } |
403 | 399 | } else { |
— | — | @@ -489,17 +485,16 @@ |
490 | 486 | # This code is basically copied from generateSkinOptions(). It'd |
491 | 487 | # be nice to somehow merge this back in there to avoid redundancy. |
492 | 488 | if ( $wgAllowUserCss || $wgAllowUserJs ) { |
493 | | - $sk = $user->getSkin(); |
494 | 489 | $linkTools = array(); |
495 | 490 | |
496 | 491 | if ( $wgAllowUserCss ) { |
497 | 492 | $cssPage = Title::makeTitleSafe( NS_USER, $user->getName() . '/common.css' ); |
498 | | - $linkTools[] = $sk->link( $cssPage, wfMsgHtml( 'prefs-custom-css' ) ); |
| 493 | + $linkTools[] = Linker::link( $cssPage, wfMsgHtml( 'prefs-custom-css' ) ); |
499 | 494 | } |
500 | 495 | |
501 | 496 | if ( $wgAllowUserJs ) { |
502 | 497 | $jsPage = Title::makeTitleSafe( NS_USER, $user->getName() . '/common.js' ); |
503 | | - $linkTools[] = $sk->link( $jsPage, wfMsgHtml( 'prefs-custom-js' ) ); |
| 498 | + $linkTools[] = Linker::link( $jsPage, wfMsgHtml( 'prefs-custom-js' ) ); |
504 | 499 | } |
505 | 500 | |
506 | 501 | $defaultPreferences['commoncssjs'] = array( |
— | — | @@ -1065,7 +1060,6 @@ |
1066 | 1061 | } |
1067 | 1062 | } |
1068 | 1063 | asort( $validSkinNames ); |
1069 | | - $sk = $user->getSkin(); |
1070 | 1064 | |
1071 | 1065 | foreach ( $validSkinNames as $skinkey => $sn ) { |
1072 | 1066 | $linkTools = array(); |
— | — | @@ -1082,12 +1076,12 @@ |
1083 | 1077 | # Create links to user CSS/JS pages |
1084 | 1078 | if ( $wgAllowUserCss ) { |
1085 | 1079 | $cssPage = Title::makeTitleSafe( NS_USER, $user->getName() . '/' . $skinkey . '.css' ); |
1086 | | - $linkTools[] = $sk->link( $cssPage, wfMsgHtml( 'prefs-custom-css' ) ); |
| 1080 | + $linkTools[] = Linker::link( $cssPage, wfMsgHtml( 'prefs-custom-css' ) ); |
1087 | 1081 | } |
1088 | 1082 | |
1089 | 1083 | if ( $wgAllowUserJs ) { |
1090 | 1084 | $jsPage = Title::makeTitleSafe( NS_USER, $user->getName() . '/' . $skinkey . '.js' ); |
1091 | | - $linkTools[] = $sk->link( $jsPage, wfMsgHtml( 'prefs-custom-js' ) ); |
| 1085 | + $linkTools[] = Linker::link( $jsPage, wfMsgHtml( 'prefs-custom-js' ) ); |
1092 | 1086 | } |
1093 | 1087 | |
1094 | 1088 | $display = $sn . ' ' . wfMsg( 'parentheses', $wgLang->pipeList( $linkTools ) ); |
— | — | @@ -1504,12 +1498,9 @@ |
1505 | 1499 | function getButtons() { |
1506 | 1500 | $html = parent::getButtons(); |
1507 | 1501 | |
1508 | | - global $wgUser; |
1509 | | - |
1510 | | - $sk = $wgUser->getSkin(); |
1511 | 1502 | $t = SpecialPage::getTitleFor( 'Preferences', 'reset' ); |
1512 | 1503 | |
1513 | | - $html .= "\n" . $sk->link( $t, wfMsgHtml( 'restoreprefs' ) ); |
| 1504 | + $html .= "\n" . Linker::link( $t, wfMsgHtml( 'restoreprefs' ) ); |
1514 | 1505 | |
1515 | 1506 | $html = Xml::tags( 'div', array( 'class' => 'mw-prefs-buttons' ), $html ); |
1516 | 1507 | |