From 250caa19a03267bdb539bb28036e4f625b41ab6f Mon Sep 17 00:00:00 2001 From: MatmaRex Date: Sat, 24 Aug 2013 15:21:33 +0200 Subject: [PATCH] Remove 'mediawiki.legacy.wikiprintable' module It's a relic of simpler times, no longer used by any core skin. The 'mediawiki.legacy.commonPrint' module can be used instead. (SkinTemplate-based skins do it automatically.) * The 'mediawiki.legacy.wikiprintable' module has been removed. * The skins/common/wikiprintable.css file has been deleted. * Skin#commonPrintStylesheet has been deprecated; its return value is ignored. Dependency: I96e66ff8905416bea906d40cdd72ba646399191b Change-Id: Icbcebc8f539f7786d037b717d262684e9931aca6 --- RELEASE-NOTES-1.22 | 4 ++ includes/OutputPage.php | 4 -- includes/Skin.php | 13 ++++-- includes/SkinTemplate.php | 4 -- maintenance/dictionary/mediawiki.dic | 1 - resources/Resources.php | 5 --- skins/common/wikiprintable.css | 59 ---------------------------- 7 files changed, 13 insertions(+), 77 deletions(-) delete mode 100644 skins/common/wikiprintable.css diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index 295a95fd8b..8570646031 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -444,6 +444,10 @@ changes to languages because of Bugzilla reports. Functions related to disambiguation pages are now handled by the Disambiguator extension (https://www.mediawiki.org/wiki/Extension:Disambiguator) (bug 35981). +* BREAKING CHANGE: The 'mediawiki.legacy.wikiprintable' module has been removed. + The skins/common/wikiprintable.css file no longer exists. Return value of + Skin#commonPrintStylesheet is ignored. Please use the 'mediawiki.legacy.commonPrint' + module instead or base your skin on SkinTemplate. == Compatibility == diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 0df28a8c25..1d0c9309a1 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2481,10 +2481,6 @@ $templates $userdir = $this->getLanguage()->getDir(); $sitedir = $wgContLang->getDir(); - if ( $sk->commonPrintStylesheet() ) { - $this->addModuleStyles( 'mediawiki.legacy.wikiprintable' ); - } - $ret = Html::htmlHeader( array( 'lang' => $this->getLanguage()->getHtmlCode(), 'dir' => $userdir, 'class' => 'client-nojs' ) ); if ( $this->getHTMLTitle() == '' ) { diff --git a/includes/Skin.php b/includes/Skin.php index 26cac585fe..5801806c9a 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -1342,14 +1342,19 @@ abstract class Skin extends ContextSource { } /** - * Should we load mediawiki.legacy.wikiprintable? Skins that have their own - * print stylesheet should override this and return false. (This is an - * ugly hack to get Monobook to play nicely with OutputPage::headElement().) + * This function previously controlled whether the 'mediawiki.legacy.wikiprintable' module + * should be loaded by OutputPage. That module no longer exists and the return value of this + * method is ignored. * + * If your skin doesn't provide its own print styles, the 'mediawiki.legacy.commonPrint' module + * can be used instead (SkinTemplate-based skins do it automatically). + * + * @deprecated since 1.22 * @return bool */ public function commonPrintStylesheet() { - return true; + wfDeprecated( __METHOD__, '1.22' ); + return false; } /** diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index e3ef6ac29c..ccfb3dbe8c 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -1296,10 +1296,6 @@ class SkinTemplate extends Skin { function getNameSpaceKey() { return $this->getTitle()->getNamespaceKey(); } - - public function commonPrintStylesheet() { - return false; - } } /** diff --git a/maintenance/dictionary/mediawiki.dic b/maintenance/dictionary/mediawiki.dic index 0c1ace195a..164b5b05ec 100644 --- a/maintenance/dictionary/mediawiki.dic +++ b/maintenance/dictionary/mediawiki.dic @@ -4446,7 +4446,6 @@ wikipage wikipedia wikipedian wikipedias -wikiprintable wikis wikisyntax wikitable diff --git a/resources/Resources.php b/resources/Resources.php index 7850d0370e..60edb56a22 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1123,11 +1123,6 @@ return array( ), 'position' => 'top', ), - 'mediawiki.legacy.wikiprintable' => array( - 'styles' => array( 'common/wikiprintable.css' => array( 'media' => 'print' ) ), - 'remoteBasePath' => $GLOBALS['wgStylePath'], - 'localBasePath' => $GLOBALS['wgStyleDirectory'], - ), 'mediawiki.ui' => array( 'skinStyles' => array( 'default' => 'resources/mediawiki.ui/mediawiki.ui.default.css', diff --git a/skins/common/wikiprintable.css b/skins/common/wikiprintable.css deleted file mode 100644 index dc236ea0c6..0000000000 --- a/skins/common/wikiprintable.css +++ /dev/null @@ -1,59 +0,0 @@ -/* MediaWiki print stylesheet */ - -body { - color: #000000; - background: #ffffff; -} - -/* MSIE/Win doesn't understand 'inherit' */ -a, -a.external, -a.new, -a.stub { - color: black !important; - text-decoration: none !important; -} -#article { - margin: 0 !important; -} - -/* Continue ... */ -a, -a.external, -a.new, -a.stub { - color: inherit !important; - text-decoration: inherit !important; -} - -/* Hide UI stuff */ -#quickbar, -#topbar, -#logo, -#footer, -#siteNotice, -.mw-editsection, -.toctoggle { - display: none; -} - -/* */ -#article { - position: relative; - margin: inherit !important; -} - -.printfooter { - border-top: solid 1px black; - display: block !important; -} - -/* Old stuff. @todo FIXME: -a.CBlink { color: #0000AA; text-decoration: none; font-size: 12pt; } -a.interwiki, -a.external { color: #3333BB; text-decoration: none; } -h1.pagetitle { padding-bottom: 0; margin-bottom: 0; } -i.link, -u.link { color: #000066; } -p.subtitle { padding-top: 0; margin-top: 0; } -*/ -- 2.20.1