r40842 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40841‎ | r40842 | r40843 >
Date:05:04, 15 September 2008
Author:krimpet
Status:old
Tags:
Comment:
Reverted r40771 for now - causes problems with CentralAuth
Modified paths:
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/User.php
@@ -834,11 +834,6 @@
835835 } else if ( isset( $_COOKIE["{$wgCookiePrefix}Token"] ) ) {
836836 $passwordCorrect = $this->mToken == $_COOKIE["{$wgCookiePrefix}Token"];
837837 $from = 'cookie';
838 -
839 - if ( ( $sName == $this->mName ) && $passwordCorrect ) {
840 - # New session from old cookie - spread any applicable autoblocks
841 - $this->spreadBlock();
842 - }
843838 } else {
844839 # No session or persistent login cookie
845840 $this->loadDefaults();
@@ -1054,6 +1049,9 @@
10551050 $this->mBlockedby = $this->mBlock->mBy;
10561051 $this->mBlockreason = $this->mBlock->mReason;
10571052 $this->mHideName = $this->mBlock->mHideName;
 1053+ if ( $this->isLoggedIn() ) {
 1054+ $this->spreadBlock();
 1055+ }
10581056 } else {
10591057 $this->mBlock = null;
10601058 wfDebug( __METHOD__.": No block.\n" );
@@ -2238,9 +2236,6 @@
22392237 } else {
22402238 $cookies['Token'] = false;
22412239 }
2242 -
2243 - # Spread any applicable autoblocks
2244 - $this->spreadBlock();
22452240
22462241 wfRunHooks( 'UserSetCookies', array( $this, &$session, &$cookies ) );
22472242 $_SESSION = $session + $_SESSION;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r40771#15577: Moved spreading of autoblocks from User::isBlocked() et al to ::setCo...krimpet05:48, 13 September 2008