Added @import for [[MediaWiki:Common.css]] to all skins
authorTim Starling <tstarling@users.mediawiki.org>
Sun, 23 Oct 2005 10:47:43 +0000 (10:47 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sun, 23 Oct 2005 10:47:43 +0000 (10:47 +0000)
RELEASE-NOTES
includes/Skin.php
includes/SkinTemplate.php

index 5d750c8..b7d93af 100644 (file)
@@ -165,7 +165,7 @@ fully support the editing toolbar, but was found to be too confusing.
 * Avoid notice warning on edit with no User-Agent header
 * Various fixes
 * Fix wfMsg*() replacements; args containing literal $[2-9] were wiped
-
+* Added @import for [[MediaWiki:Common.css]] to all skins
 
 === Caveats ===
 
index 4902c46..9f723ba 100644 (file)
@@ -253,10 +253,11 @@ class Skin extends Linker {
         * Some styles that are set by user through the user settings interface.
         */
        function doGetUserStyles() {
-               global $wgUser, $wgContLang;
+               global $wgUser, $wgContLang, $wgSquidMaxage;
 
-               $csspage = $wgContLang->getNsText( NS_MEDIAWIKI ) . ':' . $this->getSkinName() . '.css';
-               $s = '@import "'.$this->makeUrl($csspage, 'action=raw&ctype=text/css')."\";\n";
+               $query = "action=raw&ctype=text/css&smaxage=$wgSquidMaxage";
+               $s = '@import "' . $this->makeNSUrl( 'Common.css', $query, NS_MEDIAWIKI ) . "\";\n" .
+                       '@import "'.$this->makeNSUrl( ucfirst( $this->getSkinName() . '.css' ), $query, NS_MEDIAWIKI ) . "\";\n";
 
                return $s . $this->reallyDoGetUserStyles();
        }
index 4e1e3c7..812d94e 100644 (file)
@@ -940,7 +940,9 @@ class SkinTemplate extends Skin {
 
                # If we use the site's dynamic CSS, throw that in, too
                if ( $wgUseSiteCss ) {
-                       $sitecss .= '@import "' . $this->makeNSUrl(ucfirst($this->skinname) . '.css', 'action=raw&ctype=text/css&smaxage=' . $wgSquidMaxage, NS_MEDIAWIKI) . '";' . "\n";
+                       $query = "action=raw&ctype=text/css&smaxage=$wgSquidMaxage";            
+                       $sitecss .= '@import "' . $this->makeNSUrl('Common.css', $query, NS_MEDIAWIKI) . '";' . "\n";
+                       $sitecss .= '@import "' . $this->makeNSUrl(ucfirst($this->skinname) . '.css', $query, NS_MEDIAWIKI) . '";' . "\n";                      
                        $sitecss .= '@import "' . $this->makeUrl('-','action=raw&gen=css' . $siteargs) . '";' . "\n";
                }