set mediawiki version number
[lhc/web/wiklou.git] / includes / installer / Installer.php
index 2cad7d1..8140527 100644 (file)
@@ -308,7 +308,7 @@ abstract class Installer {
 
        /**
         * UI interface for displaying a short message
-        * The parameters are like parameters to wfMsg().
+        * The parameters are like parameters to wfMessage().
         * The messages will be in wikitext format, which will be converted to an
         * output format such as HTML or text before being sent to the user.
         * @param $msg
@@ -339,7 +339,7 @@ abstract class Installer {
 
                // Load the installer's i18n file.
                $wgExtensionMessagesFiles['MediawikiInstaller'] =
-                       dirname( __FILE__ ) . '/Installer.i18n.php';
+                       __DIR__ . '/Installer.i18n.php';
 
                // Having a user with id = 0 safeguards us from DB access via User::loadOptions().
                $wgUser = User::newFromId( 0 );
@@ -645,7 +645,7 @@ abstract class Installer {
                $allNames = array();
 
                foreach ( self::getDBTypes() as $name ) {
-                       $allNames[] = wfMsg( "config-type-$name" );
+                       $allNames[] = wfMessage( "config-type-$name" )->text();
                }
 
                // cache initially available databases to make sure that everything will be displayed correctly
@@ -935,7 +935,7 @@ abstract class Installer {
         */
        protected function envCheckPath() {
                global $IP;
-               $IP = dirname( dirname( dirname( __FILE__ ) ) );
+               $IP = dirname( dirname( __DIR__ ) );
                $this->setVar( 'IP', $IP );
 
                $this->showMessage( 'config-using-uri', $this->getVar( 'wgServer' ), $this->getVar( 'wgScriptPath' ) );
@@ -1594,8 +1594,12 @@ abstract class Installer {
                $status = Status::newGood();
                try {
                        $page = WikiPage::factory( Title::newMainPage() );
-                       $page->doEdit( wfMsgForContent( 'mainpagetext' ) . "\n\n" .
-                                                       wfMsgForContent( 'mainpagedocfooter' ),
+                       $content = new WikitextContent (
+                               wfMessage( 'mainpagetext' )->inContentLanguage()->text() . "\n\n" .
+                               wfMessage( 'mainpagedocfooter' )->inContentLanguage()->text()
+                       );
+
+                       $page->doEditContent( $content,
                                                        '',
                                                        EDIT_NEW,
                                                        false,