From: Thalia Date: Wed, 20 Feb 2019 10:40:59 +0000 (+0000) Subject: Block: Remove unnecessary lines related to old use of Block::prevents X-Git-Tag: 1.34.0-rc.0~2756^2 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=1f95fe2e7032f1fab0463ba213f8b4a0b235620e;p=lhc%2Fweb%2Fwiklou.git Block: Remove unnecessary lines related to old use of Block::prevents Block::prevents simply returns true for 'edit'. In Block::newLoad, prevents was called as a setter with 'edit', but there was nothing to set - this call was removed in I0e1316964192113. This patch removes some more lines related to that call. Originally added in r84475 (6dbcdc1be097) for T15611. Change-Id: I8778229d7adfcdee9e21cf560462ef7e7d1c67b3 --- diff --git a/includes/Block.php b/includes/Block.php index 11dbcd1964..1a54394ee1 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -375,9 +375,6 @@ class Block { # Lower will be better $bestBlockScore = 100; - # This is begging for $this = $bestBlock, but that's not allowed in PHP :( - $bestBlockPreventsEdit = null; - foreach ( $res as $row ) { $block = self::newFromRow( $row ); @@ -409,7 +406,6 @@ class Block { if ( $score < $bestBlockScore ) { $bestBlockScore = $score; $bestRow = $row; - $bestBlockPreventsEdit = $block->appliesToRight( 'edit' ); } }