Merge "Revert "Breaking out disallowed CSS into a global variable""
[lhc/web/wiklou.git] / includes / installer / WebInstaller.php
index 66e8bd9..ea86231 100644 (file)
@@ -180,9 +180,9 @@ class WebInstaller extends Installer {
                        return $this->session;
                }
 
-               $cssDir = $this->request->getVal( 'css' );
-               if ( $cssDir ) {
-                       $this->outputCss( $cssDir );
+               $isCSS = $this->request->getVal( 'css' );
+               if ( $isCSS ) {
+                       $this->outputCss();
                        return $this->session;
                }
 
@@ -729,16 +729,6 @@ class WebInstaller extends Installer {
                $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.
@@ -1135,8 +1125,18 @@ class WebInstaller extends Installer {
                        $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' );
 
@@ -1154,12 +1154,11 @@ class WebInstaller extends Installer {
        }
 
        /**
-        * @param string $dir CSS direction ( rtl or ltr )
+        * Output stylesheet for web installer pages
         */
-       public function outputCss( $dir ) {
-               $dir = ( $dir == 'rtl' ? 'rtl' : 'ltr' );
+       public function outputCss() {
                $this->request->response()->header( 'Content-type: text/css' );
-               echo $this->output->getCSS( $dir );
+               echo $this->output->getCSS();
        }
 
        /**