r65469 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65468‎ | r65469 | r65470 >
Date:17:29, 23 April 2010
Author:mah
Status:ok
Tags:
Comment:
Remove code that looks like it came from Perl as it “works” (doesn't produce an error) but always evaluates to true.

$ php -r '$a = array();var_dump($a > 0);'
bool(true)
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -1408,7 +1408,7 @@
14091409 # Several cascading protected pages may include this page...
14101410 # Check each cascading level
14111411 # This is only for protection restrictions, not for all actions
1412 - if( $cascadingSources > 0 && isset($restrictions[$action]) ) {
 1412+ if( isset($restrictions[$action]) ) {
14131413 foreach( $restrictions[$action] as $right ) {
14141414 $right = ( $right == 'sysop' ) ? 'protect' : $right;
14151415 if( $right != '' && !$user->isAllowed( $right ) ) {

Status & tagging log