http://www.mediawiki.org/wiki/Special:Code/MediaWiki/90934
Revision: 90934
Author: bawolff
Date: 2011-06-28 04:00:40 +0000 (Tue, 28 Jun 2011)
Log Message:
-----------
(follow-up to some RequestContext revision) When Special:userlogin creates a
new user, not only replace
$wgUser, but also do RequestContext::getMain()->setUser( $new_user );
Otherwise this causes a bug in the page immediatly after account creation where
the
personal url's go to the wrong place, and the js wgUser variables are wrong.
I didn't add any release notes, since I'm tagging this for 1.18, and it was
broken in 1.18,
so its not fixing anything between versions. (hopefully that's correct thing to
do).
Modified Paths:
--------------
trunk/phase3/includes/specials/SpecialUserlogin.php
Modified: trunk/phase3/includes/specials/SpecialUserlogin.php
===================================================================
--- trunk/phase3/includes/specials/SpecialUserlogin.php 2011-06-28 03:51:00 UTC
(rev 90933)
+++ trunk/phase3/includes/specials/SpecialUserlogin.php 2011-06-28 04:00:40 UTC
(rev 90934)
@@ -224,6 +224,10 @@
if( $wgUser->isAnon() ) {
$wgUser = $u;
$wgUser->setCookies();
+ // This should set it for OutputPage and the Skin
+ // which is needed or the personal links will be
+ // wrong.
+ RequestContext::getMain()->setUser( $u );
wfRunHooks( 'AddNewAccount', array( $wgUser, false ) );
$wgUser->addNewUserLogEntry();
if( $this->hasSessionCookie() ) {
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs