X-Git-Url: https://git.heureux-cyclage.org/w/index.php?a=blobdiff_plain;f=includes%2Finstaller%2FInstaller.php;h=ac5dbd747ce4237a93eb1936056b690e3f7aa1bc;hb=38c7f444e1c13327e203ce4e2890826782b39876;hp=2cad7d13ed6a1b8ec5678c605ab7d766b2af7ae9;hpb=37bd1bc2ced48ec394f600f67c1bd556e3b9f25c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 2cad7d13ed..ac5dbd747c 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -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,12 +1594,13 @@ abstract class Installer { $status = Status::newGood(); try { $page = WikiPage::factory( Title::newMainPage() ); - $page->doEdit( wfMsgForContent( 'mainpagetext' ) . "\n\n" . - wfMsgForContent( 'mainpagedocfooter' ), - '', - EDIT_NEW, - false, - User::newFromName( 'MediaWiki default' ) ); + $page->doEdit( wfMessage( 'mainpagetext' )->inContentLanguage()->text() . "\n\n" . + wfMessage( 'mainpagedocfooter' )->inContentLanguage()->text(), + '', + 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() );