X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fview.php;h=8683eed5c5cbb8372dd874d4b68f855622f3e5ff;hb=9d2d6089938254118b2e5eb16e377fda0979bb41;hp=952b8253ee3bba08349bdcb4fe3f1040c49f2fad;hpb=0c2687f44eb0e8c7f480b7303f89056682ba0bfb;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/view.php b/maintenance/view.php index 952b8253ee..8683eed5c5 100644 --- a/maintenance/view.php +++ b/maintenance/view.php @@ -21,6 +21,8 @@ * @ingroup Maintenance */ +use MediaWiki\Revision\RevisionRecord; + require_once __DIR__ . '/Maintenance.php'; /** @@ -36,14 +38,14 @@ class ViewCLI extends Maintenance { } public function execute() { - $title = Title::newFromText( $this->getArg() ); + $title = Title::newFromText( $this->getArg( 0 ) ); if ( !$title ) { $this->fatalError( "Invalid title" ); } $page = WikiPage::factory( $title ); - $content = $page->getContent( Revision::RAW ); + $content = $page->getContent( RevisionRecord::RAW ); if ( !$content ) { $this->fatalError( "Page has no content" ); } @@ -51,7 +53,7 @@ class ViewCLI extends Maintenance { $this->fatalError( "Non-text content models not supported" ); } - $this->output( $content->getNativeData() ); + $this->output( $content->getText() ); } }