From: Aaron Schulz Date: Sun, 9 Oct 2011 12:30:13 +0000 (+0000) Subject: FU r99323: spread blocks for edit/move attempts via the API (which uses these functions) X-Git-Tag: 1.31.0-rc.0~27178 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=529c5e7cfe28378d782c82410e157851d1cd3b26;p=lhc%2Fweb%2Fwiklou.git FU r99323: spread blocks for edit/move attempts via the API (which uses these functions) --- diff --git a/includes/EditPage.php b/includes/EditPage.php index e5b0fbf072..cece348716 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -947,6 +947,8 @@ class EditPage { } if ( $wgUser->isBlockedFrom( $this->mTitle, false ) ) { + // Auto-block user's IP if the account was "hard" blocked + $wgUser->spreadAnyEditBlock(); # Check block state against master, thus 'false'. $status->setResult( false, self::AS_BLOCKED_PAGE_FOR_USER ); wfProfileOut( __METHOD__ . '-checks' ); diff --git a/includes/Title.php b/includes/Title.php index 7bcde18c93..84a88e3b0d 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -3151,8 +3151,11 @@ class Title { * @return Mixed true on success, getUserPermissionsErrors()-like array on failure */ public function moveTo( &$nt, $auth = true, $reason = '', $createRedirect = true ) { + global $wgUser; $err = $this->isValidMoveOperation( $nt, $auth, $reason ); if ( is_array( $err ) ) { + // Auto-block user's IP if the account was "hard" blocked + $wgUser->spreadAnyEditBlock(); return $err; }