X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fprotect.php;h=31b2101c685bb405b5c48e0de47571ff8903d689;hb=996b7350f3355f24abb55394ced108c0c9b8ef3a;hp=4a3148ad712e2066f5c0a2d78744164e52dfa12c;hpb=592637225a4d5db5abcdc288d838c160284eef08;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/protect.php b/maintenance/protect.php index 4a3148ad71..31b2101c68 100644 --- a/maintenance/protect.php +++ b/maintenance/protect.php @@ -54,7 +54,7 @@ class Protect extends Maintenance { } if ( $userName === false ) { - $user = User::newSystemUser( 'Maintenance script', array( 'steal' => true ) ); + $user = User::newSystemUser( 'Maintenance script', [ 'steal' => true ] ); } else { $user = User::newFromName( $userName ); } @@ -63,14 +63,14 @@ class Protect extends Maintenance { } // @todo FIXME: This is reset 7 lines down. - $restrictions = array( 'edit' => $protection, 'move' => $protection ); + $restrictions = [ 'edit' => $protection, 'move' => $protection ]; $t = Title::newFromText( $this->getArg() ); if ( !$t ) { $this->error( "Invalid title", true ); } - $restrictions = array(); + $restrictions = []; foreach ( $t->getRestrictionTypes() as $type ) { $restrictions[$type] = $protection; } @@ -79,7 +79,7 @@ class Protect extends Maintenance { $this->output( "Updating protection status... " ); $page = WikiPage::factory( $t ); - $status = $page->doUpdateRestrictions( $restrictions, array(), $cascade, $reason, $user ); + $status = $page->doUpdateRestrictions( $restrictions, [], $cascade, $reason, $user ); if ( $status->isOK() ) { $this->output( "done\n" );