X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fprotect.php;h=ec03f9349d59f8cced297268d5fd47c1603408d7;hb=3e326854f24c7f0bcc9a858523f2189799f53cbd;hp=e60ee0818f682ecea1531395fd31f4317ef89b69;hpb=7d1fae940a4387853e9970b840154de0c8bb7119;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/protect.php b/maintenance/protect.php index e60ee0818f..ec03f9349d 100644 --- a/maintenance/protect.php +++ b/maintenance/protect.php @@ -21,7 +21,7 @@ * @ingroup Maintenance */ -require_once( dirname( __FILE__ ) . '/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;