r99349 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99348‎ | r99349 | r99350 >
Date:12:30, 9 October 2011
Author:aaron
Status:ok (Comments)
Tags:
Comment:
FU r99323: spread blocks for edit/move attempts via the API (which uses these functions)
Modified paths:
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -947,6 +947,8 @@
948948 }
949949
950950 if ( $wgUser->isBlockedFrom( $this->mTitle, false ) ) {
 951+ // Auto-block user's IP if the account was "hard" blocked
 952+ $wgUser->spreadAnyEditBlock();
951953 # Check block state against master, thus 'false'.
952954 $status->setResult( false, self::AS_BLOCKED_PAGE_FOR_USER );
953955 wfProfileOut( __METHOD__ . '-checks' );
Index: trunk/phase3/includes/Title.php
@@ -3151,8 +3151,11 @@
31523152 * @return Mixed true on success, getUserPermissionsErrors()-like array on failure
31533153 */
31543154 public function moveTo( &$nt, $auth = true, $reason = '', $createRedirect = true ) {
 3155+ global $wgUser;
31553156 $err = $this->isValidMoveOperation( $nt, $auth, $reason );
31563157 if ( is_array( $err ) ) {
 3158+ // Auto-block user's IP if the account was "hard" blocked
 3159+ $wgUser->spreadAnyEditBlock();
31573160 return $err;
31583161 }
31593162

Follow-up revisions

RevisionCommit summaryAuthorDate
r100086Remove global added in 2005 by vibber (r11563). There's a new one added in r9...platonides21:00, 17 October 2011
r100655MFT r99323, r99349 - 'Only spread blocks on page edit/move attempts via sprea...aaron22:27, 24 October 2011
r1007591.18wmf1 MFT r93977, r98990, r99349, r100239, r100242reedy22:51, 25 October 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r99323* Only spread blocks on page edit/move attempts via spreadAnyEditBlock(). We ...aaron20:22, 8 October 2011

Comments

#Comment by Nikerabbit (talk | contribs)   16:46, 11 October 2011

Yay more globals.

Status & tagging log