http://www.mediawiki.org/wiki/Special:Code/MediaWiki/55508
Revision: 55508 Author: ialex Date: 2009-08-22 22:26:31 +0000 (Sat, 22 Aug 2009) Log Message: ----------- Per Brion's comment on r52683: use $wgOut->isPrintable() rather than $wgRequest->getBool( 'printable' ) Modified Paths: -------------- trunk/phase3/includes/Skin.php trunk/phase3/includes/SkinTemplate.php Modified: trunk/phase3/includes/Skin.php =================================================================== --- trunk/phase3/includes/Skin.php 2009-08-22 21:53:57 UTC (rev 55507) +++ trunk/phase3/includes/Skin.php 2009-08-22 22:26:31 UTC (rev 55508) @@ -1104,7 +1104,7 @@ $s = array(); - if ( !$wgRequest->getBool( 'printable' ) ) { + if ( !$wgOut->isPrintable() ) { $printurl = $wgRequest->escapeAppendQuery( 'printable=yes' ); $s[] = "<a href=\"$printurl\" rel=\"alternate\">" . wfMsg( 'printableversion' ) . '</a>'; } Modified: trunk/phase3/includes/SkinTemplate.php =================================================================== --- trunk/phase3/includes/SkinTemplate.php 2009-08-22 21:53:57 UTC (rev 55507) +++ trunk/phase3/includes/SkinTemplate.php 2009-08-22 22:26:31 UTC (rev 55508) @@ -256,7 +256,7 @@ $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 @@ // 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' ) _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs