Display "Printable version" links in toolbox on special pages
authorAlex Monk <krenair@gmail.com>
Wed, 8 May 2013 18:17:20 +0000 (19:17 +0100)
committerAlex Monk <krenair@gmail.com>
Wed, 8 May 2013 18:17:20 +0000 (19:17 +0100)
Bug: 48234
Change-Id: Ib8864127621c5aaca1df22083a774f352984c7d3

includes/SkinTemplate.php

index e53d424..739be06 100644 (file)
@@ -1187,15 +1187,15 @@ class SkinTemplate extends Skin {
 
                // A print stylesheet is attached to all pages, but nobody ever
                // figures that out. :)  Add a link...
-               if ( $out->isArticle() ) {
-                       if ( !$out->isPrintable() ) {
-                               $nav_urls['print'] = array(
-                                       'text' => $this->msg( 'printableversion' )->text(),
-                                       'href' => $this->getTitle()->getLocalURL(
-                                               $request->appendQueryValue( 'printable', 'yes', true ) )
-                               );
-                       }
+               if ( !$out->isPrintable() && ( $out->isArticle() || $this->getTitle()->isSpecialPage() ) ) {
+                       $nav_urls['print'] = array(
+                               'text' => $this->msg( 'printableversion' )->text(),
+                               'href' => $this->getTitle()->getLocalURL(
+                                       $request->appendQueryValue( 'printable', 'yes', true ) )
+                       );
+               }
 
+               if ( $out->isArticle() ) {
                        // Also add a "permalink" while we're at it
                        $revid = $this->getRevisionId();
                        if ( $revid ) {