*
* @param $name String
* @param $default
+ * @return null
*/
public function getSession( $name, $default = null ) {
if ( !isset( $this->session[$name] ) ) {
$this->setVar( '_UserLang', $wgLanguageCode );
} else {
$wgLanguageCode = $this->getVar( 'wgLanguageCode' );
- $wgLang = Language::factory( $this->getVar( '_UserLang' ) );
$wgContLang = Language::factory( $wgLanguageCode );
}
}
* @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 );
+ }
}
/**
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
$this->showError( 'config-no-uri' );
return false;
}
-
-
return parent::envCheckPath();
}
+ protected function envGetDefaultServer() {
+ return WebRequest::detectServer();
+ }
}