* moved installMainpage to CoreInstaller as requested in r75366
authorJure Kajzer <freakolowsky@users.mediawiki.org>
Mon, 25 Oct 2010 18:57:44 +0000 (18:57 +0000)
committerJure Kajzer <freakolowsky@users.mediawiki.org>
Mon, 25 Oct 2010 18:57:44 +0000 (18:57 +0000)
includes/installer/CoreInstaller.php
includes/installer/DatabaseInstaller.php
includes/installer/Installer.php

index 2024418..7d604b3 100644 (file)
@@ -432,6 +432,27 @@ abstract class CoreInstaller extends Installer {
                return Status::newGood();
        }
 
+       /**
+        * Insert Main Page with default content.
+        * 
+        * @return Status
+        */
+       public function installMainpage( DatabaseInstaller &$installer ) {
+               $status = Status::newGood();
+               try {
+                       $titleobj = Title::newFromText( wfMsgNoDB( "mainpage" ) );
+                       $article = new Article( $titleobj );
+                       $article->doEdit(       wfMsg( 'mainpagetext' ) . "\n\n" . wfMsgNoTrans( 'mainpagedocfooter' ),
+                                                               '',
+                                                               EDIT_NEW );
+               } catch (MWException $e) {
+                       //using raw, because $wgShowExceptionDetails can not be set yet
+                       $status->fatal( 'config-install-mainpage-failed', $e->getMessage() ); 
+               }
+               
+               return $status;
+       }
+
        /**
         * Override the necessary bits of the config to run an installation.
         */
index a1f9c93..b637495 100644 (file)
@@ -136,27 +136,6 @@ abstract class DatabaseInstaller {
                return $status;
        }
 
-       /**
-        * Insert Main Page with default content.
-        * 
-        * @return Status
-        */
-       public function createMainpage() {
-               $status = Status::newGood();
-               try {
-                       $titleobj = Title::newFromText( wfMsgNoDB( "mainpage" ) );
-                       $article = new Article( $titleobj );
-                       $article->doEdit(       wfMsg( 'mainpagetext' ) . "\n\n" . wfMsgNoTrans( 'mainpagedocfooter' ),
-                                                               '',
-                                                               EDIT_NEW );
-               } catch (MWException $e) {
-                       //using raw, because $wgShowExceptionDetails can not be set yet
-                       $status->fatal( 'config-install-mainpage-failed', $e->getMessage() ); 
-               }
-               
-               return $status;
-       }
-
        /**
         * Get the DBMS-specific options for LocalSettings.php generation.
         * 
index f11f091..e17131e 100644 (file)
@@ -372,17 +372,6 @@ abstract class Installer {
                return $installer->populateInterwikiTable();
        }
 
-       /**
-        * TODO: document
-        *
-        * @param $installer DatabaseInstaller
-        *
-        * @return Status
-        */
-       public function installMainpage( DatabaseInstaller &$installer ) {
-               return $installer->createMainpage();
-       }
-
        /**
         * Exports all wg* variables stored by the installer into global scope.
         */