Skip to content

Commit

Permalink
Minor cleanup and use namespaced LoggedUpdateMaintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
Universal-Omega authored Feb 7, 2025
1 parent 8094b46 commit de587cf
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions maintenance/createView.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,17 @@

namespace MediaWiki\Extension\DynamicPageList3\Maintenance;

use Exception;
use LoggedUpdateMaintenance;

$IP = getenv( 'MW_INSTALL_PATH' );
if ( $IP === false ) {
$IP = __DIR__ . '/../../..';
}

$IP ??= getenv( 'MW_INSTALL_PATH' ) ?: dirname( __DIR__, 3 );
require_once "$IP/maintenance/Maintenance.php";

use Exception;
use MediaWiki\Maintenance\LoggedUpdateMaintenance;

class CreateView extends LoggedUpdateMaintenance {

public function __construct() {
parent::__construct();

$this->addDescription( 'Handle creating DPL3\'s dpl_clview VIEW.' );
$this->addOption( 'recreate', 'Drop and recreate the view if it already exists', false, false );
}
Expand Down

0 comments on commit de587cf

Please sign in to comment.