Remove 'mediawiki.legacy.wikiprintable' module
authorMatmaRex <matma.rex@gmail.com>
Sat, 24 Aug 2013 13:21:33 +0000 (15:21 +0200)
committerKrinkle <krinklemail@gmail.com>
Mon, 16 Sep 2013 17:31:58 +0000 (17:31 +0000)
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
includes/OutputPage.php
includes/Skin.php
includes/SkinTemplate.php
maintenance/dictionary/mediawiki.dic
resources/Resources.php
skins/common/wikiprintable.css [deleted file]

index 295a95f..8570646 100644 (file)
@@ -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 ==
 
index 0df28a8..1d0c930 100644 (file)
@@ -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() == '' ) {
index 26cac58..5801806 100644 (file)
@@ -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;
        }
 
        /**
index e3ef6ac..ccfb3db 100644 (file)
@@ -1296,10 +1296,6 @@ class SkinTemplate extends Skin {
        function getNameSpaceKey() {
                return $this->getTitle()->getNamespaceKey();
        }
-
-       public function commonPrintStylesheet() {
-               return false;
-       }
 }
 
 /**
index 0c1ace1..164b5b0 100644 (file)
@@ -4446,7 +4446,6 @@ wikipage
 wikipedia
 wikipedian
 wikipedias
-wikiprintable
 wikis
 wikisyntax
 wikitable
index 7850d03..60edb56 100644 (file)
@@ -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 (file)
index dc236ea..0000000
+++ /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; }
-*/