From: Chad Horohoe Date: Fri, 5 Nov 2010 13:37:27 +0000 (+0000) Subject: Followup r76088: in the case where we can't read screen.css, output a comment in... X-Git-Tag: 1.31.0-rc.0~34076 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=8ea5952e129b7e672832e236d99395caf8109c0b;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 {