From 8ea5952e129b7e672832e236d99395caf8109c0b Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Fri, 5 Nov 2010 13:37:27 +0000 Subject: [PATCH] Followup r76088: in the case where we can't read screen.css, output a comment in the CSS rather than serving nothing. Cleanup path so it outputs nicer without ..'s --- includes/installer/WebInstallerOutput.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/installer/WebInstallerOutput.php b/includes/installer/WebInstallerOutput.php index 204ea9c370..4b4ba4713f 100644 --- a/includes/installer/WebInstallerOutput.php +++ b/includes/installer/WebInstallerOutput.php @@ -85,12 +85,13 @@ class WebInstallerOutput { * @return String */ public function getCSS( $dir ) { - $vectorCssFile = dirname( __FILE__ ) . '/../../skins/vector/screen.css'; + $vectorCssFile = dirname( dirname( dirname( __FILE__ ) ) ) . + '/skins/vector/screen.css'; wfSuppressWarnings(); $css = file_get_contents( $vectorCssFile ); wfRestoreWarnings(); if( !$css ) { - return ''; + return '/** Your webserver cannot read ' . $vectorCssFile . ', please check file permissions */'; } elseif( $dir == 'rtl' ) { return CSSJanus::transform( $css, true ); } else { -- 2.20.1