r12980 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r12979‎ | r12980 | r12981 >
Date:04:58, 8 February 2006
Author:robchurch
Status:old
Tags:
Comment:
partial bug 3456) Disable auto redirect to Main Page after account creation
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/SpecialUserlogin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialUserlogin.php
@@ -151,7 +151,7 @@
152152 wfRunHooks( 'AddNewAccount' );
153153
154154 if( $this->hasSessionCookie() ) {
155 - return $this->successfulLogin( wfMsg( 'welcomecreation', $wgUser->getName() ) );
 155+ return $this->successfulLogin( wfMsg( 'welcomecreation', $wgUser->getName() ), false );
156156 } else {
157157 return $this->cookieRedirectCheck( 'new' );
158158 }
@@ -407,10 +407,11 @@
408408
409409
410410 /**
411 - * @param string $msg Message that will be shown on success.
 411+ * @param string $msg Message that will be shown on success
 412+ * @param bool $auto Toggle auto-redirect to main page; default true
412413 * @access private
413414 */
414 - function successfulLogin( $msg ) {
 415+ function successfulLogin( $msg, $auto = true ) {
415416 global $wgUser;
416417 global $wgOut;
417418
@@ -422,7 +423,7 @@
423424 $wgOut->setRobotpolicy( 'noindex,nofollow' );
424425 $wgOut->setArticleRelated( false );
425426 $wgOut->addWikiText( $msg );
426 - $wgOut->returnToMain();
 427+ $wgOut->returnToMain( $auto );
427428 }
428429
429430 /** */
Index: trunk/phase3/RELEASE-NOTES
@@ -604,6 +604,7 @@
605605 * (bug 4842) Fix 'show number of watching users' with enhanced RC
606606 * (bug 4889) Fix image talk namespace for Tamil
607607 * (bug 4147) Added cleanupWatchlist.php to clear out bogus watchlist entries
 608+* (partial bug 3456) Disable auto redirect to Main Page after account creation
608609
609610
610611 === Caveats ===

Status & tagging log