r36252 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r36251‎ | r36252 | r36253 >
Date:01:04, 13 June 2008
Author:simetrical
Status:old
Tags:
Comment:
Also omit rtl.css when appropriate. Would be good to do this for main.css too for Myskin (although of course that one should be included by default, not excluded).
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)
  • /trunk/phase3/skins/MonoBook.php (modified) (history)
  • /trunk/phase3/skins/Simple.php (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/Simple.php
@@ -23,6 +23,7 @@
2424 $this->skinname = 'simple';
2525 $this->stylename = 'simple';
2626 $this->template = 'MonoBookTemplate';
 27+ $this->cssfiles = array( 'rtl' );
2728 }
2829
2930 function reallyDoGetUserStyles() {
Index: trunk/phase3/skins/MonoBook.php
@@ -27,7 +27,7 @@
2828 $this->template = 'MonoBookTemplate';
2929 # Bug 14520: skins that just include this file shouldn't load nonexis-
3030 # tent CSS fix files.
31 - $this->fixfiles = array( 'IE', 'IE50', 'IE55', 'IE60', 'IE70' );
 31+ $this->cssfiles = array( 'IE', 'IE50', 'IE55', 'IE60', 'IE70', 'rtl' );
3232 }
3333 }
3434
@@ -65,11 +65,11 @@
6666 @import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/main.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";
6767 /*]]>*/</style>
6868 <link rel="stylesheet" type="text/css" <?php if(empty($this->data['printable']) ) { ?>media="print"<?php } ?> href="<?php $this->text('printcss') ?>?<?php echo $GLOBALS['wgStyleVersion'] ?>" />
69 - <?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]-->
70 - <?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]-->
71 - <?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]-->
72 - <?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]-->
73 - <?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>
 69+ <?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]-->
 70+ <?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]-->
 71+ <?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]-->
 72+ <?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]-->
 73+ <?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>
7474 <?php } ?><meta http-equiv="imagetoolbar" content="no" /><![endif]-->
7575
7676 <?php print Skin::makeGlobalVariablesScript( $this->data ); ?>
Index: trunk/phase3/includes/SkinTemplate.php
@@ -88,10 +88,10 @@
8989 var $template;
9090
9191 /**
92 - * An array of CSS fixes files to load for IE, in conditional comments.
93 - * May include: 'IE', 'IE50', 'IE55', 'IE60', 'IE70'.
 92+ * An array of strings representing extra CSS files to load. May include:
 93+ * 'IE', 'IE50', 'IE55', 'IE60', 'IE70', 'rtl'.
9494 */
95 - var $fixfiles;
 95+ var $cssfiles;
9696
9797 /**#@-*/
9898
@@ -107,7 +107,7 @@
108108 $this->skinname = 'monobook';
109109 $this->stylename = 'monobook';
110110 $this->template = 'QuickTemplate';
111 - $this->fixfiles = array();
 111+ $this->cssfiles = array();
112112 }
113113
114114 /**
@@ -991,7 +991,7 @@
992992 $siteargs .= '&ts=' . $wgUser->mTouched;
993993 }
994994
995 - if( $wgContLang->isRTL() ) {
 995+ if( $wgContLang->isRTL() && in_array( 'rtl', $this->cssfiles ) ) {
996996 global $wgStyleVersion;
997997 $sitecss .= "@import \"$wgStylePath/$this->stylename/rtl.css?$wgStyleVersion\";\n";
998998 }
Index: trunk/phase3/RELEASE-NOTES
@@ -369,7 +369,7 @@
370370 recent changes page.
371371 * (bug 14511) MediaWiki:Delete-legend is no longer double escaped
372372 * Generate correct section anchors for numeric headers
373 -* (bug 14520) Don't load nonexistent CSS fix files for Chick, Myskin, Simple
 373+* (bug 14520) Don't load nonexistent CSS files for Chick/Myskin/Simple skins
374374
375375 === API changes in 1.13 ===
376376

Status & tagging log