http://www.mediawiki.org/wiki/Special:Code/MediaWiki/65277

Revision: 65277
Author:   raymond
Date:     2010-04-19 13:20:11 +0000 (Mon, 19 Apr 2010)

Log Message:
-----------
Add a handy link 'Special:CentralAuth' to Special:Preferences

Modified Paths:
--------------
    trunk/extensions/CentralAuth/CentralAuth.i18n.php
    trunk/extensions/CentralAuth/CentralAuthHooks.php

Modified: trunk/extensions/CentralAuth/CentralAuth.i18n.php
===================================================================
--- trunk/extensions/CentralAuth/CentralAuth.i18n.php   2010-04-19 13:01:10 UTC 
(rev 65276)
+++ trunk/extensions/CentralAuth/CentralAuth.i18n.php   2010-04-19 13:20:11 UTC 
(rev 65277)
@@ -228,6 +228,7 @@
        'centralauth-prefs-count-unattached'  => 'Unconfirmed accounts with 
your name remain on $1 {{PLURAL:$1|project|projects}}.',
        'centralauth-prefs-detail-unattached' => 'This project site has not 
been confirmed as belonging to the global account.',
        'centralauth-prefs-manage'            => 'Manage your global account',
+       'centralauth-prefs-view'              => 'View global user info',
 
        // Interaction with Special:Renameuser
        'centralauth-renameuser-merged'   => "User $1 has been migrated to the 
unified login system.

Modified: trunk/extensions/CentralAuth/CentralAuthHooks.php
===================================================================
--- trunk/extensions/CentralAuth/CentralAuthHooks.php   2010-04-19 13:01:10 UTC 
(rev 65276)
+++ trunk/extensions/CentralAuth/CentralAuthHooks.php   2010-04-19 13:20:11 UTC 
(rev 65277)
@@ -29,9 +29,7 @@
 
                wfLoadExtensionMessages('SpecialCentralAuth');
                $skin = $wgUser->getSkin();
-               $special = SpecialPage::getTitleFor( 'MergeAccount' );
 
-
                // Possible states:
                // - account not merged at all
                // - global accounts exists, but this local account is 
unattached
@@ -68,17 +66,21 @@
                        $message = wfMsgExt( 'centralauth-prefs-not-managed', 
'parseinline' );
                }
 
-               $manageLink = $skin->makeKnownLinkObj( $special,
+               $manageLinks = array();
+               $manageLinks[] = $skin->linkKnown( SpecialPage::getTitleFor( 
'MergeAccount' ),
                        wfMsgExt( 'centralauth-prefs-manage', 'parseinline' ) );
-               
-               $prefInsert =
+               $manageLinks[] = $skin->linkKnown( SpecialPage::getTitleFor( 
'CentralAuth', $wgUser->getName() ),
+                       wfMsgExt( 'centralauth-prefs-view', 'parseinline' ) );
+               $manageLinkList = wfMsg( 'parentheses', $wgLang->pipeList( 
$manageLinks ) );
+
+               $prefInsert = 
                        array( 'globalaccountstatus' =>
                                array(
                                        'section' => 'personal/info',
                                        'label-message' => 
'centralauth-prefs-status',
                                        'type' => 'info',
                                        'raw' => true,
-                                       'default' => "$message<br 
/>($manageLink)"
+                                       'default' => "$message<br 
/>$manageLinkList"
                                ),
                        );
 



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to