From 11512c043e92754e7c2f2dbd0380fc2ee9482b48 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 22 Aug 2009 22:26:31 +0000 Subject: [PATCH] Per Brion's comment on r52683: use $wgOut->isPrintable() rather than $wgRequest->getBool( 'printable' ) --- includes/Skin.php | 2 +- includes/SkinTemplate.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/Skin.php b/includes/Skin.php index 1ac24acf12..ab41d29212 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -1104,7 +1104,7 @@ END; $s = array(); - if ( !$wgRequest->getBool( 'printable' ) ) { + if ( !$wgOut->isPrintable() ) { $printurl = $wgRequest->escapeAppendQuery( 'printable=yes' ); $s[] = "" . wfMsg( 'printableversion' ) . ''; } diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index c9bec3b2ce..2161962cc4 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -256,7 +256,7 @@ class SkinTemplate extends Skin { $tpl->setRef( 'skinname', $this->skinname ); $tpl->set( 'skinclass', get_class( $this ) ); $tpl->setRef( 'stylename', $this->stylename ); - $tpl->set( 'printable', $wgRequest->getBool( 'printable' ) ); + $tpl->set( 'printable', $out->isPrintable() ); $tpl->set( 'handheld', $wgRequest->getBool( 'handheld' ) ); $tpl->setRef( 'loggedin', $this->loggedin ); $tpl->set( 'notspecialpage', $this->mTitle->getNamespace() != NS_SPECIAL ); @@ -904,7 +904,7 @@ 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 == 'view' || $action == 'purge' ) ) { - if ( !$wgRequest->getBool( 'printable' ) ) { + if ( !$wgOut->isPrintable() ) { $nav_urls['print'] = array( 'text' => wfMsg( 'printableversion' ), 'href' => $wgRequest->appendQuery( 'printable=yes' ) -- 2.20.1