r93325 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93324‎ | r93325 | r93326 >
Date:22:34, 27 July 2011
Author:catrope
Status:ok
Tags:
Comment:
Followup r93321: revert r93237 for extensions too
Modified paths:
  • /trunk/extensions/DynamicPageList/DPLMain.php (modified) (history)
  • /trunk/extensions/TorBlock/TorBlock.class.php (modified) (history)
  • /trunk/extensions/regexBlock/regexBlockCore.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TorBlock/TorBlock.class.php
@@ -200,7 +200,7 @@
201201 */
202202 public static function onGetBlockedStatus( &$user ) {
203203 global $wgTorDisableAdminBlocks;
204 - if ( $wgTorDisableAdminBlocks && self::isExitNode() && $user->isBlocked() && $user->getBlock()->getType() != Block::TYPE_USER ) {
 204+ if ( $wgTorDisableAdminBlocks && self::isExitNode() && $user->mBlock && $user->mBlock->getType() != Block::TYPE_USER ) {
205205 wfDebug( "User using Tor node. Disabling IP block as it was probably targetted at the tor node." );
206206
207207 // Node is probably blocked for being a Tor node. Remove block.
Index: trunk/extensions/regexBlock/regexBlockCore.php
@@ -570,16 +570,16 @@
571571 }
572572 /* account creation check goes through the same hook... */
573573 if ( $valid['create'] == 1 ) {
574 - if ( $user->isBlocked() ) {
575 - $user->getBlock()->prevents( 'createaccount', true );
 574+ if ( $user->mBlock ) {
 575+ $user->mBlock->prevents( 'createaccount', true );
576576 }
577577 }
578578 /* set expiry information */
579 - if ( $user->isBlocked() ) {
 579+ if ( $user->mBlock ) {
580580 # $user->mBlock->mId = $valid['blckid']; FIXME: why does this want to do this?
581 - $user->getBlock()->mExpiry = $valid['expire'];
582 - $user->getBlock()->mTimestamp = $valid['timestamp'];
583 - $user->getBlock()->setTarget( ($valid['ip'] == 1) ? wfGetIP() : $user->getName() );
 581+ $user->mBlock->mExpiry = $valid['expire'];
 582+ $user->mBlock->mTimestamp = $valid['timestamp'];
 583+ $user->mBlock->setTarget( ($valid['ip'] == 1) ? wfGetIP() : $user->getName() );
584584 }
585585
586586 $result = self::updateStats( $user, $user_ip, $blocker, $valid['match'], $valid['blckid'] );
Index: trunk/extensions/DynamicPageList/DPLMain.php
@@ -2995,7 +2995,6 @@
29962996 if ( isset( $iTitleMaxLen ) && ( strlen( $sTitleText ) > $iTitleMaxLen ) ) {
29972997 $sTitleText = substr( $sTitleText, 0, $iTitleMaxLen ) . '...';
29982998 }
2999 -
30002999 if ( $bShowCurID && isset( $row->page_id ) ) {
30013000 $articleLink = '<html>' . $sk->makeKnownLinkObj( $title, htmlspecialchars( $sTitleText ), 'curid=' . $row->page_id ) . '</html>';
30023001 } elseif ( !$bEscapeLinks && ( $pageNamespace == 14 || $pageNamespace == 6 ) ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r93237Follow-up r93234: use User::getBlock() accessor rather than accessing $mBlock...happy-melon19:58, 26 July 2011
r93321Revert r93237 ("use User::getBlock() accessor rather than accessing $mBlock d...catrope22:28, 27 July 2011

Status & tagging log