$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 );
-
+ $this->outputCss( $cssDir );
return $this->session;
}
restore_error_handler();
if ( $this->phpErrors ) {
- $this->showError( 'config-session-error', $this->phpErrors[0] );
-
return false;
}
return WebRequest::detectServer();
}
+ /**
+ * @param string $dir CSS direction ( rtl or ltr )
+ */
+ public function outputCss( $dir ) {
+ $dir = ( $dir == 'rtl' ? 'rtl' : 'ltr' );
+ $this->request->response()->header( 'Content-type: text/css' );
+ echo $this->output->getCSS( $dir );
+ }
+
+ /**
+ * @return string[]
+ */
+ public function getPhpErrors() {
+ return $this->phpErrors;
+ }
+
}
$installer = InstallerOverrides::getWebInstaller( $wgRequest );
if ( !$installer->startSession() ) {
+
+ if( $installer->request->getVal( "css" ) ) {
+ // Do not display errors on css pages
+ $cssDir = $installer->request->getVal( "css" );
+ $installer->outputCss( $cssDir );
+ exit;
+ }
+
+ $errors = $installer->getPhpErrors();
+ $installer->showError( 'config-session-error', $errors[0] );
$installer->finish();
exit;
}