partial bug 3456) Disable auto redirect to Main Page after account creation
authorRob Church <robchurch@users.mediawiki.org>
Wed, 8 Feb 2006 04:58:45 +0000 (04:58 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Wed, 8 Feb 2006 04:58:45 +0000 (04:58 +0000)
RELEASE-NOTES
includes/SpecialUserlogin.php

index 8829e76..eb932ee 100644 (file)
@@ -604,6 +604,7 @@ fully support the editing toolbar, but was found to be too confusing.
 * (bug 4842) Fix 'show number of watching users' with enhanced RC
 * (bug 4889) Fix image talk namespace for Tamil
 * (bug 4147) Added cleanupWatchlist.php to clear out bogus watchlist entries
+* (partial bug 3456) Disable auto redirect to Main Page after account creation
 
 
 === Caveats ===
index fb36df6..149dcb4 100644 (file)
@@ -151,7 +151,7 @@ class LoginForm {
                wfRunHooks( 'AddNewAccount' );
 
                if( $this->hasSessionCookie() ) {
-                       return $this->successfulLogin( wfMsg( 'welcomecreation', $wgUser->getName() ) );
+                       return $this->successfulLogin( wfMsg( 'welcomecreation', $wgUser->getName() ), false );
                } else {
                        return $this->cookieRedirectCheck( 'new' );
                }
@@ -407,10 +407,11 @@ class LoginForm {
 
 
        /**
-        * @param string $msg Message that will be shown on success.
+        * @param string $msg Message that will be shown on success
+        * @param bool $auto Toggle auto-redirect to main page; default true
         * @access private
         */
-       function successfulLogin( $msg ) {
+       function successfulLogin( $msg, $auto = true ) {
                global $wgUser;
                global $wgOut;
 
@@ -422,7 +423,7 @@ class LoginForm {
                $wgOut->setRobotpolicy( 'noindex,nofollow' );
                $wgOut->setArticleRelated( false );
                $wgOut->addWikiText( $msg );
-               $wgOut->returnToMain();
+               $wgOut->returnToMain( $auto );
        }
 
        /** */