Use WikiPage instead of Article
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 10 Dec 2011 20:03:19 +0000 (20:03 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 10 Dec 2011 20:03:19 +0000 (20:03 +0000)
includes/installer/Installer.php

index f951766..20429b7 100644 (file)
@@ -1525,13 +1525,13 @@ abstract class Installer {
        protected function createMainpage( DatabaseInstaller $installer ) {
                $status = Status::newGood();
                try {
-                       $article = new Article( Title::newMainPage() );
-                       $article->doEdit( wfMsgForContent( 'mainpagetext' ) . "\n\n" .
-                                                               wfMsgForContent( 'mainpagedocfooter' ),
-                                                               '',
-                                                               EDIT_NEW,
-                                                               false,
-                                                               User::newFromName( 'MediaWiki default' ) );
+                       $page = WikiPage::factory( Title::newMainPage() );
+                       $page->doEdit( wfMsgForContent( 'mainpagetext' ) . "\n\n" .
+                                                       wfMsgForContent( 'mainpagedocfooter' ),
+                                                       '',
+                                                       EDIT_NEW,
+                                                       false,
+                                                       User::newFromName( 'MediaWiki default' ) );
                } catch (MWException $e) {
                        //using raw, because $wgShowExceptionDetails can not be set yet
                        $status->fatal( 'config-install-mainpage-failed', $e->getMessage() );