Index: trunk/phase3/includes/SpecialUserlogin.php |
— | — | @@ -7,13 +7,13 @@ |
8 | 8 | /** |
9 | 9 | * constructor |
10 | 10 | */ |
11 | | -function wfSpecialUserlogin() { |
| 11 | +function wfSpecialUserlogin( $par = '' ) { |
12 | 12 | global $wgRequest; |
13 | 13 | if( session_id() == '' ) { |
14 | 14 | wfSetupSession(); |
15 | 15 | } |
16 | 16 | |
17 | | - $form = new LoginForm( $wgRequest ); |
| 17 | + $form = new LoginForm( $wgRequest, $par ); |
18 | 18 | $form->execute(); |
19 | 19 | } |
20 | 20 | |
— | — | @@ -41,11 +41,11 @@ |
42 | 42 | * Constructor |
43 | 43 | * @param WebRequest $request A WebRequest object passed by reference |
44 | 44 | */ |
45 | | - function LoginForm( &$request ) { |
| 45 | + function LoginForm( &$request, $par = '' ) { |
46 | 46 | global $wgLang, $wgAllowRealName, $wgEnableEmail; |
47 | 47 | global $wgAuth; |
48 | 48 | |
49 | | - $this->mType = $request->getText( 'type' ); |
| 49 | + $this->mType = ( $par == 'signup' ) ? $par : $request->getText( 'type' ); # Check for [[Special:Userlogin/signup]] |
50 | 50 | $this->mName = $request->getText( 'wpName' ); |
51 | 51 | $this->mPassword = $request->getText( 'wpPassword' ); |
52 | 52 | $this->mRetype = $request->getText( 'wpRetype' ); |
Index: trunk/phase3/includes/SpecialPage.php |
— | — | @@ -80,6 +80,7 @@ |
81 | 81 | |
82 | 82 | 'Userlogin' => array( 'SpecialPage', 'Userlogin' ), |
83 | 83 | 'Userlogout' => array( 'UnlistedSpecialPage', 'Userlogout' ), |
| 84 | + 'CreateAccount' => array( 'SpecialCreateAccount' ), |
84 | 85 | 'Preferences' => array( 'SpecialPage', 'Preferences' ), |
85 | 86 | 'Watchlist' => array( 'SpecialPage', 'Watchlist' ), |
86 | 87 | |
— | — | @@ -846,3 +847,17 @@ |
847 | 848 | return SpecialPage::getTitleFor( 'Contributions', $wgUser->getName() ); |
848 | 849 | } |
849 | 850 | } |
| 851 | +/** |
| 852 | + * Shortcut to construct a special page pointing to create account form. |
| 853 | + * @addtogroup SpecialPage |
| 854 | + */ |
| 855 | +class SpecialCreateAccount extends SpecialPage { |
| 856 | + function __construct() { |
| 857 | + parent::__construct( 'CreateAccount' ); |
| 858 | + $this->mAllowedRedirectParams = array( 'uselang' ); |
| 859 | + } |
| 860 | + |
| 861 | + function getRedirect() { |
| 862 | + return SpecialPage::getTitleFor( 'Userlogin', 'signup' ); |
| 863 | + } |
| 864 | +} |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -353,6 +353,7 @@ |
354 | 354 | 'Disambiguations' => array( 'Disambiguations' ), |
355 | 355 | 'Userlogin' => array( 'Userlogin' ), |
356 | 356 | 'Userlogout' => array( 'Userlogout' ), |
| 357 | + 'CreateAccount' => array( 'CreateAccount' ), |
357 | 358 | 'Preferences' => array( 'Preferences' ), |
358 | 359 | 'Watchlist' => array( 'Watchlist' ), |
359 | 360 | 'Recentchanges' => array( 'Recentchanges' ), |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -140,6 +140,8 @@ |
141 | 141 | address in Reply-To instead of From for user-to-user emails. |
142 | 142 | This protects against SPF problems and privacy-leaking bounce messages |
143 | 143 | when using mailers that set the envelope sender to the From header value. |
| 144 | +* (bug 11897) Add alias [[Special:CreateAccount]] & [[Special:Userlogin/signup]] |
| 145 | + for Special:Userlogin?type=signup |
144 | 146 | |
145 | 147 | === Bug fixes in 1.12 === |
146 | 148 | |