http://www.mediawiki.org/wiki/Special:Code/MediaWiki/99349
Revision: 99349 Author: aaron Date: 2011-10-09 12:30:13 +0000 (Sun, 09 Oct 2011) Log Message: ----------- FU r99323: spread blocks for edit/move attempts via the API (which uses these functions) Modified Paths: -------------- trunk/phase3/includes/EditPage.php trunk/phase3/includes/Title.php Modified: trunk/phase3/includes/EditPage.php =================================================================== --- trunk/phase3/includes/EditPage.php 2011-10-09 12:11:05 UTC (rev 99348) +++ trunk/phase3/includes/EditPage.php 2011-10-09 12:30:13 UTC (rev 99349) @@ -947,6 +947,8 @@ } 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' ); Modified: trunk/phase3/includes/Title.php =================================================================== --- trunk/phase3/includes/Title.php 2011-10-09 12:11:05 UTC (rev 99348) +++ trunk/phase3/includes/Title.php 2011-10-09 12:30:13 UTC (rev 99349) @@ -3151,8 +3151,11 @@ * @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; } _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs