From 340c519c6102276734ea9d3f3eecf2a05630f972 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Wed, 8 Feb 2006 04:58:45 +0000 Subject: [PATCH] partial bug 3456) Disable auto redirect to Main Page after account creation --- RELEASE-NOTES | 1 + includes/SpecialUserlogin.php | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 8829e767df..eb932eea0f 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/SpecialUserlogin.php b/includes/SpecialUserlogin.php index fb36df6819..149dcb479c 100644 --- a/includes/SpecialUserlogin.php +++ b/includes/SpecialUserlogin.php @@ -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 ); } /** */ -- 2.20.1