X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fview.php;h=b75fe5b10ff29f08a8f1763b419e82711f06e4a7;hb=86a727b908e7c729d0ccfc67ff6c2cf27ff28928;hp=8c0237f63fae34e89d1e1a49be1d10740cf10dd0;hpb=b72c4df18b00b3948f0319fa5b01f969e1b92dbd;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/view.php b/maintenance/view.php index 8c0237f63f..b75fe5b10f 100644 --- a/maintenance/view.php +++ b/maintenance/view.php @@ -39,6 +39,10 @@ class ViewCLI extends Maintenance { $title = Title::newFromText( $this->getArg() ); if ( !$title ) { $this->fatalError( "Invalid title" ); + } elseif ( $title->isSpecialPage() ) { + $this->fatalError( "Special Pages not supported" ); + } elseif ( !$title->exists() ) { + $this->fatalError( "Page does not exist" ); } $page = WikiPage::factory( $title ); @@ -55,5 +59,5 @@ class ViewCLI extends Maintenance { } } -$maintClass = "ViewCLI"; +$maintClass = ViewCLI::class; require_once RUN_MAINTENANCE_IF_MAIN;