return $this->session;
}
- $cssDir = $this->request->getVal( 'css' );
- if ( $cssDir ) {
- $cssDir = ( $cssDir == 'rtl' ? 'rtl' : 'ltr' );
- $this->request->response()->header( 'Content-type: text/css' );
- echo $this->output->getCSS( $cssDir );
-
+ $isCSS = $this->request->getVal( 'css' );
+ if ( $isCSS ) {
+ $this->outputCss();
return $this->session;
}
restore_error_handler();
if ( $this->phpErrors ) {
- $this->showError( 'config-session-error', $this->phpErrors[0] );
-
return false;
}
$html = $this->parse( $text, true );
return "<div class=\"mw-help-field-container\">\n" .
- "<span class=\"mw-help-field-hint\" title=\"" . wfMessage( 'config-help-tooltip' )->escaped() . "\">" .
+ "<span class=\"mw-help-field-hint\" title=\"" .
+ wfMessage( 'config-help-tooltip' )->escaped() . "\">" .
wfMessage( 'config-help' )->escaped() . "</span>\n" .
"<span class=\"mw-help-field-data\">" . $html . "</span>\n" .
"</div>\n";
$this->output->addHTML( $html );
}
- /**
- * @param Status $status
- */
- public function showStatusMessage( Status $status ) {
- $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.
$path = $_SERVER['SCRIPT_NAME'];
}
if ( $path !== false ) {
- $uri = preg_replace( '{^(.*)/(mw-)?config.*$}', '$1', $path );
- $this->setVar( 'wgScriptPath', $uri );
+ $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( 'wgStylePath', "$scriptPath/skins" );
+ $this->setVar( 'wgLocalStylePath', "$scriptPath/skins" );
+ $this->setVar( 'wgExtensionAssetsPath', "$scriptPath/extensions" );
+ $this->setVar( 'wgUploadPath', "$scriptPath/images" );
+
} else {
$this->showError( 'config-no-uri' );
return WebRequest::detectServer();
}
+ /**
+ * Output stylesheet for web installer pages
+ */
+ public function outputCss() {
+ $this->request->response()->header( 'Content-type: text/css' );
+ echo $this->output->getCSS();
+ }
+
+ /**
+ * @return string[]
+ */
+ public function getPhpErrors() {
+ return $this->phpErrors;
+ }
+
}