From 529c5e7cfe28378d782c82410e157851d1cd3b26 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 9 Oct 2011 12:30:13 +0000 Subject: [PATCH] FU r99323: spread blocks for edit/move attempts via the API (which uses these functions) --- includes/EditPage.php | 2 ++ includes/Title.php | 3 +++ 2 files changed, 5 insertions(+) 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; } -- 2.20.1