Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -371,6 +371,7 @@ |
372 | 372 | 'externaldberror', |
373 | 373 | 'loginproblem', |
374 | 374 | 'login', |
| 375 | + 'nav-login-createaccount', |
375 | 376 | 'loginprompt', |
376 | 377 | 'userlogin', |
377 | 378 | 'logout', |
Index: trunk/phase3/includes/SkinTemplate.php |
— | — | @@ -543,6 +543,10 @@ |
544 | 544 | 'active' => false |
545 | 545 | ); |
546 | 546 | } else { |
| 547 | + global $wgUser; |
| 548 | + $loginlink = $wgUser->isAllowed( 'createaccount' ) |
| 549 | + ? 'nav-login-createaccount' |
| 550 | + : 'login'; |
547 | 551 | if( $this->showIPinHeader() ) { |
548 | 552 | $href = &$this->userpageUrlDetails['href']; |
549 | 553 | $personal_urls['anonuserpage'] = array( |
— | — | @@ -560,14 +564,14 @@ |
561 | 565 | 'active' => ( $pageurl == $href ) |
562 | 566 | ); |
563 | 567 | $personal_urls['anonlogin'] = array( |
564 | | - 'text' => wfMsg('userlogin'), |
| 568 | + 'text' => wfMsg( $loginlink ), |
565 | 569 | 'href' => self::makeSpecialUrl( 'Userlogin', 'returnto=' . $this->thisurl ), |
566 | 570 | 'active' => $wgTitle->isSpecial( 'Userlogin' ) |
567 | 571 | ); |
568 | 572 | } else { |
569 | 573 | |
570 | 574 | $personal_urls['login'] = array( |
571 | | - 'text' => wfMsg('userlogin'), |
| 575 | + 'text' => wfMsg( $loginlink ), |
572 | 576 | 'href' => self::makeSpecialUrl( 'Userlogin', 'returnto=' . $this->thisurl ), |
573 | 577 | 'active' => $wgTitle->isSpecial( 'Userlogin' ) |
574 | 578 | ); |
Index: trunk/phase3/includes/Skin.php |
— | — | @@ -941,9 +941,12 @@ |
942 | 942 | $q = ''; |
943 | 943 | } else { $q = "returnto={$rt}"; } |
944 | 944 | |
| 945 | + $loginlink = $wgUser->isAllowed( 'createaccount' ) |
| 946 | + ? 'nav-login-createaccount' |
| 947 | + : 'login'; |
945 | 948 | $s .= "\n<br />" . $this->makeKnownLinkObj( |
946 | 949 | SpecialPage::getTitleFor( 'Userlogin' ), |
947 | | - wfMsg( 'login' ), $q ); |
| 950 | + wfMsg( $loginlink ), $q ); |
948 | 951 | } else { |
949 | 952 | $n = $wgUser->getName(); |
950 | 953 | $rt = $wgTitle->getPrefixedURL(); |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -856,6 +856,7 @@ |
857 | 857 | 'externaldberror' => 'There was either an external authentication database error or you are not allowed to update your external account.', |
858 | 858 | 'loginproblem' => '<b>There has been a problem with your login.</b><br />Try again!', |
859 | 859 | 'login' => 'Log in', |
| 860 | +'nav-login-createaccount' => 'Log in / create account', |
860 | 861 | 'loginprompt' => 'You must have cookies enabled to log in to {{SITENAME}}.', |
861 | 862 | 'userlogin' => 'Log in / create account', |
862 | 863 | 'logout' => 'Log out', |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -83,6 +83,10 @@ |
84 | 84 | * On Special:UserRights, when you can add a group you can't remove or remove |
85 | 85 | one you can't add, a notice is printed to warn you |
86 | 86 | * (bug 12698) Create PAGESIZE parser function, to return the size of a page |
| 87 | +* Allow the "log in / create account" link in the toolbar to have different |
| 88 | + text from Special:UserLogin title (new message 'nav-login-createaccount') |
| 89 | +* Say "log in / create account" if an anonymous user can create an account, |
| 90 | + otherwise just "log in", consistently across skins |
87 | 91 | |
88 | 92 | === Bug fixes in 1.13 === |
89 | 93 | |