Also omit rtl.css when appropriate. Would be good to do this for main.css too for...
authorAryeh Gregor <simetrical@users.mediawiki.org>
Fri, 13 Jun 2008 01:04:10 +0000 (01:04 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Fri, 13 Jun 2008 01:04:10 +0000 (01:04 +0000)
RELEASE-NOTES
includes/SkinTemplate.php
skins/MonoBook.php
skins/Simple.php

index e80d114..d621d0d 100644 (file)
@@ -369,7 +369,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   recent changes page.
 * (bug 14511) MediaWiki:Delete-legend is no longer double escaped
 * Generate correct section anchors for numeric headers
-* (bug 14520) Don't load nonexistent CSS fix files for Chick, Myskin, Simple
+* (bug 14520) Don't load nonexistent CSS files for Chick/Myskin/Simple skins
 
 === API changes in 1.13 ===
 
index 042dc29..c60cfb4 100644 (file)
@@ -88,10 +88,10 @@ class SkinTemplate extends Skin {
        var $template;
 
        /**
-        * An array of CSS fixes files to load for IE, in conditional comments.
-        * May include: 'IE', 'IE50', 'IE55', 'IE60', 'IE70'.
+        * An array of strings representing extra CSS files to load.  May include:
+        * 'IE', 'IE50', 'IE55', 'IE60', 'IE70', 'rtl'.
         */
-       var $fixfiles;
+       var $cssfiles;
 
        /**#@-*/
 
@@ -107,7 +107,7 @@ class SkinTemplate extends Skin {
                $this->skinname  = 'monobook';
                $this->stylename = 'monobook';
                $this->template  = 'QuickTemplate';
-               $this->fixfiles = array();
+               $this->cssfiles = array();
        }
 
        /**
@@ -991,7 +991,7 @@ class SkinTemplate extends Skin {
                        $siteargs .= '&ts=' . $wgUser->mTouched;
                }
 
-               if( $wgContLang->isRTL() ) {
+               if( $wgContLang->isRTL() && in_array( 'rtl', $this->cssfiles ) ) {
                        global $wgStyleVersion;
                        $sitecss .= "@import \"$wgStylePath/$this->stylename/rtl.css?$wgStyleVersion\";\n";
                }
index f6f97c0..5fb397f 100644 (file)
@@ -27,7 +27,7 @@ class SkinMonoBook extends SkinTemplate {
                $this->template  = 'MonoBookTemplate';
                # Bug 14520: skins that just include this file shouldn't load nonexis-
                # tent CSS fix files.
-               $this->fixfiles  = array( 'IE', 'IE50', 'IE55', 'IE60', 'IE70' );
+               $this->cssfiles = array( 'IE', 'IE50', 'IE55', 'IE60', 'IE70', 'rtl' );
        }
 }
 
@@ -65,11 +65,11 @@ class MonoBookTemplate extends QuickTemplate {
                        @import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/main.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";
                /*]]>*/</style>
                <link rel="stylesheet" type="text/css" <?php if(empty($this->data['printable']) ) { ?>media="print"<?php } ?> href="<?php $this->text('printcss') ?>?<?php echo $GLOBALS['wgStyleVersion'] ?>" />
-               <?php if( in_array( 'IE50', $skin->fixfiles ) ) { ?><!--[if lt IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE50Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
-               <?php } if( in_array( 'IE55', $skin->fixfiles ) ) { ?><!--[if IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE55Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
-               <?php } if( in_array( 'IE60', $skin->fixfiles ) ) { ?><!--[if IE 6]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE60Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
-               <?php } if( in_array( 'IE70', $skin->fixfiles ) ) { ?><!--[if IE 7]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE70Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
-               <?php } ?><!--[if lt IE 7]><?php if( in_array( 'IE', $skin->fixfiles ) ) { ?><script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath') ?>/common/IEFixes.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"></script>
+               <?php if( in_array( 'IE50', $skin->cssfiles ) ) { ?><!--[if lt IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE50Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
+               <?php } if( in_array( 'IE55', $skin->cssfiles ) ) { ?><!--[if IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE55Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
+               <?php } if( in_array( 'IE60', $skin->cssfiles ) ) { ?><!--[if IE 6]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE60Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
+               <?php } if( in_array( 'IE70', $skin->cssfiles ) ) { ?><!--[if IE 7]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE70Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
+               <?php } ?><!--[if lt IE 7]><?php if( in_array( 'IE', $skin->cssfiles ) ) { ?><script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath') ?>/common/IEFixes.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"></script>
                <?php } ?><meta http-equiv="imagetoolbar" content="no" /><![endif]-->
                
                <?php print Skin::makeGlobalVariablesScript( $this->data ); ?>
index 92aa19e..db64e48 100644 (file)
@@ -23,6 +23,7 @@ class SkinSimple extends SkinTemplate {
                $this->skinname  = 'simple';
                $this->stylename = 'simple';
                $this->template  = 'MonoBookTemplate';
+               $this->cssfiles  = array( 'rtl' );
        }
 
        function reallyDoGetUserStyles() {