$this->settings = $session['settings'] + $this->settings;
}
- $this->exportVars();
$this->setupLanguage();
if ( ( $this->getVar( '_InstallDone' ) || $this->getVar( '_UpgradeDone' ) )
$this->phpErrors = array();
set_error_handler( array( $this, 'errorHandler' ) );
try {
+ session_name( 'mw_installer_session' );
session_start();
} catch ( Exception $e ) {
restore_error_handler();
}
/**
- * 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 ) );
}
/**