Index: trunk/phase3/includes/User.php |
— | — | @@ -834,6 +834,11 @@ |
835 | 835 | } else if ( isset( $_COOKIE["{$wgCookiePrefix}Token"] ) ) { |
836 | 836 | $passwordCorrect = $this->mToken == $_COOKIE["{$wgCookiePrefix}Token"]; |
837 | 837 | $from = 'cookie'; |
| 838 | + |
| 839 | + if ( ( $sName == $this->mName ) && $passwordCorrect ) { |
| 840 | + # New session from old cookie - spread any applicable autoblocks |
| 841 | + $this->spreadBlock(); |
| 842 | + } |
838 | 843 | } else { |
839 | 844 | # No session or persistent login cookie |
840 | 845 | $this->loadDefaults(); |
— | — | @@ -1049,9 +1054,6 @@ |
1050 | 1055 | $this->mBlockedby = $this->mBlock->mBy; |
1051 | 1056 | $this->mBlockreason = $this->mBlock->mReason; |
1052 | 1057 | $this->mHideName = $this->mBlock->mHideName; |
1053 | | - if ( $this->isLoggedIn() ) { |
1054 | | - $this->spreadBlock(); |
1055 | | - } |
1056 | 1058 | } else { |
1057 | 1059 | $this->mBlock = null; |
1058 | 1060 | wfDebug( __METHOD__.": No block.\n" ); |
— | — | @@ -2236,6 +2238,9 @@ |
2237 | 2239 | } else { |
2238 | 2240 | $cookies['Token'] = false; |
2239 | 2241 | } |
| 2242 | + |
| 2243 | + # Spread any applicable autoblocks |
| 2244 | + $this->spreadBlock(); |
2240 | 2245 | |
2241 | 2246 | wfRunHooks( 'UserSetCookies', array( $this, &$session, &$cookies ) ); |
2242 | 2247 | $_SESSION = $session + $_SESSION; |