r30079 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r30078‎ | r30079 | r30080 >
Date:19:59, 23 January 2008
Author:raymond
Status:old
Tags:
Comment:
Tweak Special:CreateAccount again. Make it smarter without the needing of a new class. Thanks to ialex.
Modified paths:
  • /trunk/phase3/includes/SpecialPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialPage.php
@@ -80,7 +80,7 @@
8181
8282 'Userlogin' => array( 'SpecialPage', 'Userlogin' ),
8383 'Userlogout' => array( 'UnlistedSpecialPage', 'Userlogout' ),
84 - 'CreateAccount' => array( 'SpecialCreateAccount' ),
 84+ 'CreateAccount' => array( 'SpecialRedirectToSpecial', 'CreateAccount', 'Userlogin', 'signup', array( 'uselang' ) ),
8585 'Preferences' => array( 'SpecialPage', 'Preferences' ),
8686 'Watchlist' => array( 'SpecialPage', 'Watchlist' ),
8787
@@ -847,17 +847,3 @@
848848 return SpecialPage::getTitleFor( 'Contributions', $wgUser->getName() );
849849 }
850850 }
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( $subpage ) {
862 - return SpecialPage::getTitleFor( 'Userlogin', 'signup' );
863 - }
864 -}

Status & tagging log