r36251 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r36250‎ | r36251 | r36252 >
Date:00:51, 13 June 2008
Author:simetrical
Status:old
Tags:
Comment:
(bug 14520) Don't load nonexistent CSS fix files for Chick, Myskin, Simple
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)
  • /trunk/phase3/skins/Chick.php (modified) (history)
  • /trunk/phase3/skins/MonoBook.php (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/Chick.php
@@ -23,6 +23,7 @@
2424 $this->skinname = 'chick';
2525 $this->stylename = 'chick';
2626 $this->template = 'MonoBookTemplate';
 27+ $this->fixfiles = array( 'IE50', 'IE55', 'IE60' );
2728 }
2829 }
2930
Index: trunk/phase3/skins/MonoBook.php
@@ -25,6 +25,9 @@
2626 $this->skinname = 'monobook';
2727 $this->stylename = 'monobook';
2828 $this->template = 'MonoBookTemplate';
 29+ # Bug 14520: skins that just include this file shouldn't load nonexis-
 30+ # tent CSS fix files.
 31+ $this->fixfiles = array( 'IE', 'IE50', 'IE55', 'IE60', 'IE70' );
2932 }
3033 }
3134
@@ -62,12 +65,12 @@
6366 @import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/main.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";
6467 /*]]>*/</style>
6568 <link rel="stylesheet" type="text/css" <?php if(empty($this->data['printable']) ) { ?>media="print"<?php } ?> href="<?php $this->text('printcss') ?>?<?php echo $GLOBALS['wgStyleVersion'] ?>" />
66 - <!--[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]-->
67 - <!--[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]-->
68 - <!--[if IE 6]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE60Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
69 - <!--[if IE 7]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE70Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
70 - <!--[if lt IE 7]><script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath') ?>/common/IEFixes.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"></script>
71 - <meta http-equiv="imagetoolbar" content="no" /><![endif]-->
 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>
 74+ <?php } ?><meta http-equiv="imagetoolbar" content="no" /><![endif]-->
7275
7376 <?php print Skin::makeGlobalVariablesScript( $this->data ); ?>
7477
@@ -284,4 +287,3 @@
285288 wfRestoreWarnings();
286289 } // end of execute() method
287290 } // end of class
288 -?>
Index: trunk/phase3/includes/SkinTemplate.php
@@ -87,6 +87,12 @@
8888 */
8989 var $template;
9090
 91+ /**
 92+ * An array of CSS fixes files to load for IE, in conditional comments.
 93+ * May include: 'IE', 'IE50', 'IE55', 'IE60', 'IE70'.
 94+ */
 95+ var $fixfiles;
 96+
9197 /**#@-*/
9298
9399 /**
@@ -101,6 +107,7 @@
102108 $this->skinname = 'monobook';
103109 $this->stylename = 'monobook';
104110 $this->template = 'QuickTemplate';
 111+ $this->fixfiles = array();
105112 }
106113
107114 /**
Index: trunk/phase3/RELEASE-NOTES
@@ -369,6 +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
373374
374375 === API changes in 1.13 ===
375376

Status & tagging log