From: Krinkle Date: Sat, 20 Nov 2010 20:24:48 +0000 (+0000) Subject: Making path to bullet.gif in config.css relative to it self instead of absolute. X-Git-Tag: 1.31.0-rc.0~33797 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28?a=commitdiff_plain;h=7901bde86f1e57b871c61216d14a946af3a363bd;p=lhc%2Fweb%2Fwiklou.git Making path to bullet.gif in config.css relative to it self instead of absolute. * Installer has a 'Status of 404 (Not Found)' (/w/skins/skins/vector/images/bullet.gif). Source of this problem is "str_replace( 'images/', '../skins/vector/images/', );" on line 99 of WebInstallerOutput.php::GetCSS() which transforms this line: list-style-image: url(../skins/common/images/bullet.gif); into this: list-style-image: url(../skins/common/../skins/vector/images/bullet.gif); all other stylesheets do it relative also, therefor changing this accordingly to: list-style-image: url(images/bullet.gif); But since the installer does not load them directly but includes them from a different path, the str_replace() has been changed from a single replace for both files to two replaces, since they are not both in /vector/ images, config.css is in /common/ and it's images are in /common/images, not /vector/images. Fixed now. --- diff --git a/includes/installer/WebInstallerOutput.php b/includes/installer/WebInstallerOutput.php index fea525d570..22ccd302f0 100644 --- a/includes/installer/WebInstallerOutput.php +++ b/includes/installer/WebInstallerOutput.php @@ -89,14 +89,16 @@ class WebInstallerOutput { $vectorCssFile = "$skinDir/vector/screen.css"; $configCssFile = "$skinDir/common/config.css"; wfSuppressWarnings(); - $css = file_get_contents( $vectorCssFile ) . "\n" . file_get_contents( $configCssFile ); + $vectorCss = file_get_contents( $vectorCssFile ); + $configCss = file_get_contents( $configCssFile ); wfRestoreWarnings(); + $css = str_replace( 'images/', '../skins/vector/images/', $vectorCss ) . "\n" . str_replace( 'images/', '../skins/common/images/', $configCss ); if( !$css ) { return "/** Your webserver cannot read $vectorCssFile or $configCssFile, please check file permissions */"; } elseif( $dir == 'rtl' ) { $css = CSSJanus::transform( $css, true ); } - return str_replace( 'images/', '../skins/vector/images/', $css ); + return $css; } /** diff --git a/skins/common/config.css b/skins/common/config.css index ae554753dc..f322c7a557 100644 --- a/skins/common/config.css +++ b/skins/common/config.css @@ -94,7 +94,7 @@ .config-message { display: list-item; line-height: 1.5em; - list-style-image: url(../skins/common/images/bullet.gif); + list-style-image: url(images/bullet.gif); list-style-type: square; }