X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fprotect.php;h=ec03f9349d59f8cced297268d5fd47c1603408d7;hb=3e326854f24c7f0bcc9a858523f2189799f53cbd;hp=2f6aa1aedb77d306704f12e74f16b0838e3eed05;hpb=987319a54adf9f6208534b5ac3b60d6f88bbf7e4;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/protect.php b/maintenance/protect.php index 2f6aa1aedb..ec03f9349d 100644 --- a/maintenance/protect.php +++ b/maintenance/protect.php @@ -21,7 +21,7 @@ * @ingroup Maintenance */ -require_once( __DIR__ . '/Maintenance.php' ); +require_once __DIR__ . '/Maintenance.php'; /** * Maintenance script that protects or unprotects a page. @@ -58,6 +58,7 @@ class Protect extends Maintenance { $this->error( "Invalid username", true ); } + // @todo FIXME: This is reset 7 lines down. $restrictions = array( 'edit' => $protection, 'move' => $protection ); $t = Title::newFromText( $this->getArg() ); @@ -66,7 +67,7 @@ class Protect extends Maintenance { } $restrictions = array(); - foreach( $t->getRestrictionTypes() as $type ) { + foreach ( $t->getRestrictionTypes() as $type ) { $restrictions[$type] = $protection; } @@ -85,4 +86,4 @@ class Protect extends Maintenance { } $maintClass = "Protect"; -require_once( RUN_MAINTENANCE_IF_MAIN ); +require_once RUN_MAINTENANCE_IF_MAIN;