summaryrefslogtreecommitdiff
path: root/includes/installer/WebInstaller.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
committerPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
commitd9022f63880ce039446fba8364f68e656b7bf4cb (patch)
tree16b40fbf17bf7c9ee6f4ead25b16dd192378050a /includes/installer/WebInstaller.php
parent27cf83d177256813e2e802241085fce5dd0f3fb9 (diff)
Update to MediaWiki 1.19.0
Diffstat (limited to 'includes/installer/WebInstaller.php')
-rw-r--r--includes/installer/WebInstaller.php41
1 files changed, 28 insertions, 13 deletions
diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php
index 40726437..1ff77db7 100644
--- a/includes/installer/WebInstaller.php
+++ b/includes/installer/WebInstaller.php
@@ -355,6 +355,7 @@ class WebInstaller extends Installer {
/**
* Show an error message in a box. Parameters are like wfMsg().
+ * @param $msg
*/
public function showError( $msg /*...*/ ) {
$args = func_get_args();
@@ -366,6 +367,8 @@ class WebInstaller extends Installer {
/**
* Temporary error handler for session start debugging.
+ * @param $errno
+ * @param $errstr string
*/
public function errorHandler( $errno, $errstr ) {
$this->phpErrors[] = $errstr;
@@ -469,7 +472,6 @@ class WebInstaller extends Installer {
$this->setVar( '_UserLang', $wgLanguageCode );
} else {
$wgLanguageCode = $this->getVar( 'wgLanguageCode' );
- $wgLang = Language::factory( $this->getVar( '_UserLang' ) );
$wgContLang = Language::factory( $wgLanguageCode );
}
}
@@ -630,6 +632,7 @@ class WebInstaller extends Installer {
* Get small text indented help for a preceding form field.
* Parameters like wfMsg().
*
+ * @param $msg
* @return string
*/
public function getHelpBox( $msg /*, ... */ ) {
@@ -637,13 +640,12 @@ class WebInstaller extends Installer {
array_shift( $args );
$args = array_map( 'htmlspecialchars', $args );
$text = wfMsgReal( $msg, $args, false, false, false );
- $html = htmlspecialchars( $text );
$html = $this->parse( $text, true );
return "<div class=\"mw-help-field-container\">\n" .
- "<span class=\"mw-help-field-hint\">" . wfMsgHtml( 'config-help' ) . "</span>\n" .
- "<span class=\"mw-help-field-data\">" . $html . "</span>\n" .
- "</div>\n";
+ "<span class=\"mw-help-field-hint\">" . wfMsgHtml( 'config-help' ) . "</span>\n" .
+ "<span class=\"mw-help-field-data\">" . $html . "</span>\n" .
+ "</div>\n";
}
/**
@@ -675,18 +677,20 @@ class WebInstaller extends Installer {
* @param $status Status
*/
public function showStatusMessage( Status $status ) {
- $text = $status->getWikiText();
- $this->output->addWikiText(
- "<div class=\"config-message\">\n" .
- $text .
- "</div>"
- );
+ $errors = array_merge( $status->getErrorsArray(), $status->getWarningsArray() );
+ foreach ( $errors as $error ) {
+ call_user_func_array( array( $this, 'showMessage' ), $error );
+ }
}
/**
* Label a control by wrapping a config-input div around it and putting a
* label before it.
*
+ * @param $msg
+ * @param $forId
+ * @param $contents
+ * @param $helpData string
* @return string
*/
public function label( $msg, $forId, $contents, $helpData = "" ) {
@@ -1013,6 +1017,7 @@ class WebInstaller extends Installer {
/**
* Helper for Installer::docLink()
*
+ * @param $page
* @return string
*/
protected function getDocUrl( $page ) {
@@ -1028,6 +1033,9 @@ class WebInstaller extends Installer {
/**
* Extension tag hook for a documentation link.
*
+ * @param $linkText
+ * @param $attribs
+ * @param $parser
* @return string
*/
public function docLink( $linkText, $attribs, $parser ) {
@@ -1040,6 +1048,9 @@ class WebInstaller extends Installer {
/**
* Helper for "Download LocalSettings" link on WebInstall_Complete
*
+ * @param $text
+ * @param $attribs
+ * @param $parser
* @return String Html for download link
*/
public function downloadLinkHook( $text, $attribs, $parser ) {
@@ -1054,6 +1065,9 @@ class WebInstaller extends Installer {
return Html::rawElement( 'div', array( 'class' => 'config-download-link' ), $anchor );
}
+ /**
+ * @return bool
+ */
public function envCheckPath( ) {
// PHP_SELF isn't available sometimes, such as when PHP is CGI but
// cgi.fix_pathinfo is disabled. In that case, fall back to SCRIPT_NAME
@@ -1071,9 +1085,10 @@ class WebInstaller extends Installer {
$this->showError( 'config-no-uri' );
return false;
}
-
-
return parent::envCheckPath();
}
+ protected function envGetDefaultServer() {
+ return WebRequest::detectServer();
+ }
}