Merge "Display "Printable version" links in toolbox on special pages"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sun, 30 Jun 2013 17:14:13 +0000 (17:14 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sun, 30 Jun 2013 17:14:13 +0000 (17:14 +0000)
includes/SkinTemplate.php

index 18f410a..4af6332 100644 (file)
@@ -1190,15 +1190,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 ) {