r65277 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65276‎ | r65277 | r65278 >
Date:13:20, 19 April 2010
Author:raymond
Status:ok
Tags:
Comment:
Add a handy link 'Special:CentralAuth' to Special:Preferences
Modified paths:
  • /trunk/extensions/CentralAuth/CentralAuth.i18n.php (modified) (history)
  • /trunk/extensions/CentralAuth/CentralAuthHooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralAuth/CentralAuthHooks.php
@@ -29,9 +29,7 @@
3030
3131 wfLoadExtensionMessages('SpecialCentralAuth');
3232 $skin = $wgUser->getSkin();
33 - $special = SpecialPage::getTitleFor( 'MergeAccount' );
3433
35 -
3634 // Possible states:
3735 // - account not merged at all
3836 // - global accounts exists, but this local account is unattached
@@ -68,17 +66,21 @@
6967 $message = wfMsgExt( 'centralauth-prefs-not-managed', 'parseinline' );
7068 }
7169
72 - $manageLink = $skin->makeKnownLinkObj( $special,
 70+ $manageLinks = array();
 71+ $manageLinks[] = $skin->linkKnown( SpecialPage::getTitleFor( 'MergeAccount' ),
7372 wfMsgExt( 'centralauth-prefs-manage', 'parseinline' ) );
74 -
75 - $prefInsert =
 73+ $manageLinks[] = $skin->linkKnown( SpecialPage::getTitleFor( 'CentralAuth', $wgUser->getName() ),
 74+ wfMsgExt( 'centralauth-prefs-view', 'parseinline' ) );
 75+ $manageLinkList = wfMsg( 'parentheses', $wgLang->pipeList( $manageLinks ) );
 76+
 77+ $prefInsert =
7678 array( 'globalaccountstatus' =>
7779 array(
7880 'section' => 'personal/info',
7981 'label-message' => 'centralauth-prefs-status',
8082 'type' => 'info',
8183 'raw' => true,
82 - 'default' => "$message<br />($manageLink)"
 84+ 'default' => "$message<br />$manageLinkList"
8385 ),
8486 );
8587
Index: trunk/extensions/CentralAuth/CentralAuth.i18n.php
@@ -228,6 +228,7 @@
229229 'centralauth-prefs-count-unattached' => 'Unconfirmed accounts with your name remain on $1 {{PLURAL:$1|project|projects}}.',
230230 'centralauth-prefs-detail-unattached' => 'This project site has not been confirmed as belonging to the global account.',
231231 'centralauth-prefs-manage' => 'Manage your global account',
 232+ 'centralauth-prefs-view' => 'View global user info',
232233
233234 // Interaction with Special:Renameuser
234235 'centralauth-renameuser-merged' => "User $1 has been migrated to the unified login system.

Status & tagging log