Making path to bullet.gif in config.css relative to it self instead of absolute.
authorKrinkle <krinkle@users.mediawiki.org>
Sat, 20 Nov 2010 20:24:48 +0000 (20:24 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Sat, 20 Nov 2010 20:24:48 +0000 (20:24 +0000)
* 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.

includes/installer/WebInstallerOutput.php
skins/common/config.css

index fea525d..22ccd30 100644 (file)
@@ -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;
        }
 
        /**
index ae55475..f322c7a 100644 (file)
@@ -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;
 }