Index: branches/REL1_18/phase3/includes/User.php |
— | — | @@ -1274,9 +1274,6 @@ |
1275 | 1275 | $this->mBlockreason = $this->mBlock->mReason; |
1276 | 1276 | $this->mHideName = $this->mBlock->mHideName; |
1277 | 1277 | $this->mAllowUsertalk = !$this->mBlock->prevents( 'editownusertalk' ); |
1278 | | - if ( $this->isLoggedIn() && $wgUser->getID() == $this->getID() ) { |
1279 | | - $this->spreadBlock(); |
1280 | | - } |
1281 | 1278 | } |
1282 | 1279 | |
1283 | 1280 | # Proxy blocking |
— | — | @@ -2906,22 +2903,35 @@ |
2907 | 2904 | } |
2908 | 2905 | |
2909 | 2906 | /** |
2910 | | - * If this (non-anonymous) user is blocked, block any IP address |
2911 | | - * they've successfully logged in from. |
| 2907 | + * If this user is logged-in and blocked, |
| 2908 | + * block any IP address they've successfully logged in from. |
| 2909 | + * @return bool A block was spread |
2912 | 2910 | */ |
2913 | | - public function spreadBlock() { |
| 2911 | + public function spreadAnyEditBlock() { |
| 2912 | + if ( $this->isLoggedIn() && $this->isBlocked() ) { |
| 2913 | + return $this->spreadBlock(); |
| 2914 | + } |
| 2915 | + return false; |
| 2916 | + } |
| 2917 | + |
| 2918 | + /** |
| 2919 | + * If this (non-anonymous) user is blocked, |
| 2920 | + * block the IP address they've successfully logged in from. |
| 2921 | + * @return bool A block was spread |
| 2922 | + */ |
| 2923 | + protected function spreadBlock() { |
2914 | 2924 | wfDebug( __METHOD__ . "()\n" ); |
2915 | 2925 | $this->load(); |
2916 | 2926 | if ( $this->mId == 0 ) { |
2917 | | - return; |
| 2927 | + return false; |
2918 | 2928 | } |
2919 | 2929 | |
2920 | 2930 | $userblock = Block::newFromTarget( $this->getName() ); |
2921 | 2931 | if ( !$userblock ) { |
2922 | | - return; |
| 2932 | + return false; |
2923 | 2933 | } |
2924 | 2934 | |
2925 | | - $userblock->doAutoblock( wfGetIP() ); |
| 2935 | + return (bool)$userblock->doAutoblock( $this->getRequest()->getIP() ); |
2926 | 2936 | } |
2927 | 2937 | |
2928 | 2938 | /** |
Index: branches/REL1_18/phase3/includes/EditPage.php |
— | — | @@ -402,6 +402,9 @@ |
403 | 403 | |
404 | 404 | $permErrors = $this->getEditPermissionErrors(); |
405 | 405 | if ( $permErrors ) { |
| 406 | + // Auto-block user's IP if the account was "hard" blocked |
| 407 | + $wgUser->spreadAnyEditBlock(); |
| 408 | + |
406 | 409 | wfDebug( __METHOD__ . ": User can't edit\n" ); |
407 | 410 | $content = $this->getContent( null ); |
408 | 411 | $content = $content === '' ? null : $content; |
— | — | @@ -934,6 +937,8 @@ |
935 | 938 | return $status; |
936 | 939 | } |
937 | 940 | if ( $wgUser->isBlockedFrom( $this->mTitle, false ) ) { |
| 941 | + // Auto-block user's IP if the account was "hard" blocked |
| 942 | + $wgUser->spreadAnyEditBlock(); |
938 | 943 | # Check block state against master, thus 'false'. |
939 | 944 | $status->setResult( false, self::AS_BLOCKED_PAGE_FOR_USER ); |
940 | 945 | wfProfileOut( __METHOD__ . '-checks' ); |
Property changes on: branches/REL1_18/phase3/includes/EditPage.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
941 | 946 | Merged /trunk/phase3/includes/EditPage.php:r99323,99349,99630 |
Index: branches/REL1_18/phase3/includes/Title.php |
— | — | @@ -3139,8 +3139,11 @@ |
3140 | 3140 | * @return Mixed true on success, getUserPermissionsErrors()-like array on failure |
3141 | 3141 | */ |
3142 | 3142 | public function moveTo( &$nt, $auth = true, $reason = '', $createRedirect = true ) { |
| 3143 | + global $wgUser; |
3143 | 3144 | $err = $this->isValidMoveOperation( $nt, $auth, $reason ); |
3144 | 3145 | if ( is_array( $err ) ) { |
| 3146 | + // Auto-block user's IP if the account was "hard" blocked |
| 3147 | + $wgUser->spreadAnyEditBlock(); |
3145 | 3148 | return $err; |
3146 | 3149 | } |
3147 | 3150 | |
Property changes on: branches/REL1_18/phase3/includes/Title.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
3148 | 3151 | Merged /trunk/phase3/includes/Title.php:r99349,99630 |
Index: branches/REL1_18/phase3/includes/specials/SpecialMovepage.php |
— | — | @@ -74,7 +74,9 @@ |
75 | 75 | # Check rights |
76 | 76 | $permErrors = $this->oldTitle->getUserPermissionsErrors( 'move', $wgUser ); |
77 | 77 | if( !empty( $permErrors ) ) { |
78 | | - $wgOut->showPermissionsErrorPage( $permErrors ); |
| 78 | + // Auto-block user's IP if the account was "hard" blocked |
| 79 | + $user->spreadAnyEditBlock(); |
| 80 | + $this->getOutput()->showPermissionsErrorPage( $permErrors ); |
79 | 81 | return; |
80 | 82 | } |
81 | 83 | |
Property changes on: branches/REL1_18/phase3/includes/specials |
___________________________________________________________________ |
Modified: svn:mergeinfo |
82 | 84 | Merged /trunk/phase3/includes/specials:r99323,99349,99630 |
Property changes on: branches/REL1_18/phase3/includes |
___________________________________________________________________ |
Modified: svn:mergeinfo |
83 | 85 | Merged /trunk/phase3/includes:r99323,99349,99630 |
Index: branches/REL1_18/phase3/languages/messages/MessagesGl.php |
— | — | @@ -46,6 +46,11 @@ |
47 | 47 | 'Conversa_Categoría' => NS_CATEGORY_TALK, |
48 | 48 | ); |
49 | 49 | |
| 50 | +$namespaceGenderAliases = array( |
| 51 | + NS_USER => array( 'male' => 'Usuario', 'female' => 'Usuaria' ), |
| 52 | + NS_USER_TALK => array( 'male' => 'Conversa_usuario', 'female' => 'Conversa_usuaria' ), |
| 53 | +); |
| 54 | + |
50 | 55 | $defaultDateFormat = 'dmy'; |
51 | 56 | |
52 | 57 | $dateFormats = array( |
Property changes on: branches/REL1_18/phase3/languages/messages |
___________________________________________________________________ |
Modified: svn:mergeinfo |
53 | 58 | Merged /trunk/phase3/languages/messages:r99630 |
Property changes on: branches/REL1_18/phase3/languages |
___________________________________________________________________ |
Modified: svn:mergeinfo |
54 | 59 | Merged /trunk/phase3/languages:r99630 |
Property changes on: branches/REL1_18/phase3 |
___________________________________________________________________ |
Modified: svn:mergeinfo |
55 | 60 | Merged /trunk/phase3:r99323,99349,99630 |