X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Finstaller%2FWebInstaller.php;h=e8433f2a97764b2d5b6357a987212301fea04cf1;hb=309d7d71d32c89743a01606d501e5a2319e0da96;hp=c2243b9efd7dfe71b733b5645eee84fcc2736849;hpb=5ca028cac137fae6e539a06dcc554a0854b45221;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index c2243b9efd..e8433f2a97 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -159,7 +159,6 @@ class WebInstaller extends Installer { $this->settings = $session['settings'] + $this->settings; } - $this->exportVars(); $this->setupLanguage(); if ( ( $this->getVar( '_InstallDone' ) || $this->getVar( '_UpgradeDone' ) ) @@ -343,6 +342,7 @@ class WebInstaller extends Installer { $this->phpErrors = array(); set_error_handler( array( $this, 'errorHandler' ) ); try { + session_name( 'mw_installer_session' ); session_start(); } catch ( Exception $e ) { restore_error_handler(); @@ -386,15 +386,19 @@ class WebInstaller extends Installer { } /** - * Show an error message in a box. Parameters are like wfMessage(). - * @param string $msg + * Show an error message in a box. Parameters are like wfMessage(), or + * alternatively, pass a Message object in. + * @param string|Message $msg */ public function showError( $msg /*...*/ ) { - $args = func_get_args(); - array_shift( $args ); - $args = array_map( 'htmlspecialchars', $args ); - $msg = wfMessage( $msg, $args )->useDatabase( false )->plain(); - $this->output->addHTML( $this->getErrorBox( $msg ) ); + if ( !( $msg instanceof Message ) ) { + $args = func_get_args(); + array_shift( $args ); + $args = array_map( 'htmlspecialchars', $args ); + $msg = wfMessage( $msg, $args ); + } + $text = $msg->useDatabase( false )->plain(); + $this->output->addHTML( $this->getErrorBox( $text ) ); } /**