From ac59bf34ddde5a4b31416c77b8e65c436d03bac4 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 5 Feb 2007 17:44:19 +0000 Subject: [PATCH] * (bug 8875) Show printable link in MonoBook sidebar for locally nonexistent pages; perhaps useful for categories and shared images --- RELEASE-NOTES | 2 ++ includes/SkinTemplate.php | 11 +++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 8ce9248044..e57f417269 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -173,6 +173,8 @@ lighter making things easier to read. * (bug 4347) use MailAddress object for reply-to * Add AlphabeticPager abstract class * Use faster AlphabeticPager for Special:Categories +* (bug 8875) Show printable link in MonoBook sidebar for locally nonexistent + pages; perhaps useful for categories and shared images == Languages updated == diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 7e2d57bd67..ee3daec2be 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -838,12 +838,10 @@ class SkinTemplate extends Skin { // A print stylesheet is attached to all pages, but nobody ever // figures that out. :) Add a link... if( $this->iscontent && ($action == '' || $action == 'view' || $action == 'purge' ) ) { - $revid = $wgArticle ? $wgArticle->getLatest() : 0; - if ( !( $revid == 0 ) ) - $nav_urls['print'] = array( - 'text' => wfMsg( 'printableversion' ), - 'href' => $wgRequest->appendQuery( 'printable=yes' ) - ); + $nav_urls['print'] = array( + 'text' => wfMsg( 'printableversion' ), + 'href' => $wgRequest->appendQuery( 'printable=yes' ) + ); // Also add a "permalink" while we're at it if ( (int)$oldid ) { @@ -852,6 +850,7 @@ class SkinTemplate extends Skin { 'href' => '' ); } else { + $revid = $wgArticle ? $wgArticle->getLatest() : 0; if ( !( $revid == 0 ) ) $nav_urls['permalink'] = array( 'text' => wfMsg( 'permalink' ), -- 2.20.1