X-Git-Url: https://git.heureux-cyclage.org/index.php?a=blobdiff_plain;f=maintenance%2FnukePage.php;h=ff821cc5e355cec22fa82dd65f5076ebd09c6e9b;hb=925fe0df015458a330d320c9f1a0014d32ff8866;hp=dc455209964a4426e559f1e626a09e8a6a4945a0;hpb=6505e5f278aae664f78fb8f876c10902d2195231;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/nukePage.php b/maintenance/nukePage.php index dc45520996..ff821cc5e3 100644 --- a/maintenance/nukePage.php +++ b/maintenance/nukePage.php @@ -33,13 +33,12 @@ require_once __DIR__ . '/Maintenance.php'; class NukePage extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Remove a page record from the database"; + $this->addDescription( 'Remove a page record from the database' ); $this->addOption( 'delete', "Actually delete the page" ); $this->addArg( 'title', 'Title to delete' ); } public function execute() { - $name = $this->getArg(); $delete = $this->getOption( 'delete', false ); @@ -62,7 +61,7 @@ class NukePage extends Maintenance { # Get corresponding revisions $this->output( "Searching for revisions..." ); $res = $dbw->query( "SELECT rev_id FROM $tbl_rev WHERE rev_page = $id" ); - $revs = array(); + $revs = []; foreach ( $res as $row ) { $revs[] = $row->rev_id; }