Index: trunk/phase3/includes/User.php |
— | — | @@ -1053,8 +1053,10 @@ |
1054 | 1054 | $this->spreadBlock(); |
1055 | 1055 | } |
1056 | 1056 | } else { |
1057 | | - $this->mBlock = null; |
1058 | | - wfDebug( __METHOD__.": No block.\n" ); |
| 1057 | + // Bug 13611, apply account creation blocks to users. |
| 1058 | + // Note that the existence of $this->mBlock is not used |
| 1059 | + // to check for edit blocks, $this->mBlockedby is instead. |
| 1060 | + # $this->mBlock = null; |
1059 | 1061 | } |
1060 | 1062 | |
1061 | 1063 | # Proxy blocking |
Index: trunk/phase3/includes/Block.php |
— | — | @@ -79,7 +79,7 @@ |
80 | 80 | $dbr = wfGetDB( DB_SLAVE ); |
81 | 81 | $res = $dbr->resultObject( $dbr->select( 'ipblocks', '*', |
82 | 82 | array( 'ipb_id' => $id ), __METHOD__ ) ); |
83 | | - $block = new Block; |
| 83 | + $block = new Block(); |
84 | 84 | if ( $block->loadFromResult( $res ) ) { |
85 | 85 | return $block; |
86 | 86 | } else { |
— | — | @@ -161,7 +161,9 @@ |
162 | 162 | if ( $user && $this->mAnonOnly ) { |
163 | 163 | # Block is marked anon-only |
164 | 164 | # Whitelist this IP address against autoblocks and range blocks |
165 | | - $this->clear(); |
| 165 | + if( !$this->mCreateAccount ) { |
| 166 | + $this->clear(); // bug 13611 - keep this data |
| 167 | + } |
166 | 168 | return false; |
167 | 169 | } else { |
168 | 170 | return true; |
— | — | @@ -172,7 +174,9 @@ |
173 | 175 | # Try range block |
174 | 176 | if ( $this->loadRange( $address, $killExpired, $user ) ) { |
175 | 177 | if ( $user && $this->mAnonOnly ) { |
176 | | - $this->clear(); |
| 178 | + if( !$this->mCreateAccount ) { |
| 179 | + $this->clear(); // bug 13611 - keep this data |
| 180 | + } |
177 | 181 | return false; |
178 | 182 | } else { |
179 | 183 | return true; |