From a1789ddde42033f1b05cc4929491214ee6e79383 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 17 Dec 2015 09:15:42 +0100 Subject: Update to MediaWiki 1.26.0 --- includes/installer/WebInstaller.php | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'includes/installer/WebInstaller.php') diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index 156606a6..8e58e294 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -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 ) ); } /** @@ -696,11 +700,11 @@ class WebInstaller extends Installer { $text = wfMessage( $msg, $args )->useDatabase( false )->plain(); $html = $this->parse( $text, true ); - return "
\n" . - "\n" . + "escaped() . "\">" . wfMessage( 'config-help' )->escaped() . "\n" . - "" . $html . "\n" . + "" . $html . "\n" . "
\n"; } @@ -1184,12 +1188,11 @@ class WebInstaller extends Installer { } if ( $path !== false ) { $scriptPath = preg_replace( '{^(.*)/(mw-)?config.*$}', '$1', $path ); - $scriptExtension = $this->getVar( 'wgScriptExtension' ); $this->setVar( 'wgScriptPath', "$scriptPath" ); // Update variables set from Setup.php that are derived from wgScriptPath - $this->setVar( 'wgScript', "$scriptPath/index$scriptExtension" ); - $this->setVar( 'wgLoadScript', "$scriptPath/load$scriptExtension" ); + $this->setVar( 'wgScript', "$scriptPath/index.php" ); + $this->setVar( 'wgLoadScript', "$scriptPath/load.php" ); $this->setVar( 'wgStylePath', "$scriptPath/skins" ); $this->setVar( 'wgLocalStylePath', "$scriptPath/skins" ); $this->setVar( 'wgExtensionAssetsPath', "$scriptPath/extensions" ); -- cgit v1.2.2