diff options
author | jenkins-bot <jenkins-bot@gerrit.wikimedia.org> | 2014-06-04 20:04:47 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@wikimedia.org> | 2014-06-04 20:04:47 +0000 |
commit | 966c249fb32b9f49e11bce31f71f02d5d5273c00 (patch) | |
tree | c87f696a62cda3cab5a1336c983b7febe2662495 | |
parent | 345175637c4894fbfe2cc50a31a021664e474ee4 (diff) | |
parent | 81e74e8d6943be0ed5dfb0bf9248d9f5573cc091 (diff) | |
download | mediawikicore-966c249fb32b9f49e11bce31f71f02d5d5273c00.tar.gz mediawikicore-966c249fb32b9f49e11bce31f71f02d5d5273c00.zip |
Merge "Installer: Simplify css request"
-rw-r--r-- | includes/installer/WebInstaller.php | 13 | ||||
-rw-r--r-- | includes/installer/WebInstallerOutput.php | 10 |
2 files changed, 10 insertions, 13 deletions
diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index 66e8bd97155c..46348f917cef 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -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; } @@ -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(); } /** diff --git a/includes/installer/WebInstallerOutput.php b/includes/installer/WebInstallerOutput.php index c3fd51de7688..fd6ed0099416 100644 --- a/includes/installer/WebInstallerOutput.php +++ b/includes/installer/WebInstallerOutput.php @@ -125,11 +125,9 @@ class WebInstallerOutput { * designed to be used in, rather than just grabbing a list of filenames from it, * and not properly handling such details as media types in module definitions. * - * @param string $dir 'ltr' or 'rtl' - * * @return string */ - public function getCSS( $dir ) { + public function getCSS() { // All CSS files these modules reference will be concatenated in sequence // and loaded as one file. $moduleNames = array( @@ -200,7 +198,7 @@ class WebInstallerOutput { $css = $prepend . $css; - if ( $dir == 'rtl' ) { + if ( $this->getDir() == 'rtl' ) { $css = CSSJanus::transform( $css, true ); } @@ -208,12 +206,12 @@ class WebInstallerOutput { } /** - * "<link>" to index.php?css=foobar for the "<head>" + * "<link>" to index.php?css=1 for the "<head>" * * @return string */ private function getCssUrl() { - return Html::linkedStyle( $_SERVER['PHP_SELF'] . '?css=' . $this->getDir() ); + return Html::linkedStyle( $_SERVER['PHP_SELF'] . '?css=1' ); } public function useShortHeader( $use = true ) { |