From 0c462b0f6c08cab8ae428b26357984ae3c335b77 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Fri, 13 Jun 2008 00:51:52 +0000 Subject: [PATCH] (bug 14520) Don't load nonexistent CSS fix files for Chick, Myskin, Simple --- RELEASE-NOTES | 1 + includes/SkinTemplate.php | 7 +++++++ skins/Chick.php | 1 + skins/MonoBook.php | 16 +++++++++------- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index cebf30fdf0..e80d114c2e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -369,6 +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 === API changes in 1.13 === diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index fa1ed86dfa..042dc29ac1 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -87,6 +87,12 @@ 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'. + */ + var $fixfiles; + /**#@-*/ /** @@ -101,6 +107,7 @@ class SkinTemplate extends Skin { $this->skinname = 'monobook'; $this->stylename = 'monobook'; $this->template = 'QuickTemplate'; + $this->fixfiles = array(); } /** diff --git a/skins/Chick.php b/skins/Chick.php index b7d961065a..cfbdbc7dd6 100644 --- a/skins/Chick.php +++ b/skins/Chick.php @@ -23,6 +23,7 @@ class SkinChick extends SkinTemplate { $this->skinname = 'chick'; $this->stylename = 'chick'; $this->template = 'MonoBookTemplate'; + $this->fixfiles = array( 'IE50', 'IE55', 'IE60' ); } } diff --git a/skins/MonoBook.php b/skins/MonoBook.php index 146a2703f8..f6f97c0237 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -25,6 +25,9 @@ class SkinMonoBook extends SkinTemplate { $this->skinname = 'monobook'; $this->stylename = 'monobook'; $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' ); } } @@ -62,12 +65,12 @@ class MonoBookTemplate extends QuickTemplate { @import "text('stylepath') ?>/text('stylename') ?>/main.css?"; /*]]>*/ data['printable']) ) { ?>media="print" href="text('printcss') ?>?" /> - - - - - + fixfiles ) ) { ?> + fixfiles ) ) { ?> + fixfiles ) ) { ?> + fixfiles ) ) { ?> + data ); ?> @@ -284,4 +287,3 @@ class MonoBookTemplate extends QuickTemplate { wfRestoreWarnings(); } // end of execute() method } // end of class -?> -- 2.20.1