X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2FfixDoubleRedirects.php;h=a76617aa7f68df83a3c90309dcad5b58c4b6adfb;hp=79f75ef7ed944e3c08047793e2d929a424019299;hb=ebc5cca3181d19c4ed488ba78cd3a39446dcb055;hpb=2dd58ade75d15a5895c0c010e17b6f729a0f72fe diff --git a/maintenance/fixDoubleRedirects.php b/maintenance/fixDoubleRedirects.php index 79f75ef7ed..a76617aa7f 100644 --- a/maintenance/fixDoubleRedirects.php +++ b/maintenance/fixDoubleRedirects.php @@ -42,13 +42,13 @@ class FixDoubleRedirects extends Maintenance { } public function execute() { - $async = $this->getOption( 'async', false ); - $dryrun = $this->getOption( 'dry-run', false ); + $async = $this->hasOption( 'async' ); + $dryrun = $this->hasOption( 'dry-run' ); if ( $this->hasOption( 'title' ) ) { $title = Title::newFromText( $this->getOption( 'title' ) ); if ( !$title || !$title->isRedirect() ) { - $this->error( $title->getPrefixedText() . " is not a redirect!\n", true ); + $this->fatalError( $title->getPrefixedText() . " is not a redirect!\n" ); } } else { $title = null; @@ -136,5 +136,5 @@ class FixDoubleRedirects extends Maintenance { } } -$maintClass = "FixDoubleRedirects"; +$maintClass = FixDoubleRedirects::class; require_once RUN_MAINTENANCE_IF_MAIN;