r55508 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55507‎ | r55508 | r55509 >
Date:22:26, 22 August 2009
Author:ialex
Status:ok
Tags:
Comment:
Per Brion's comment on r52683: use $wgOut->isPrintable() rather than $wgRequest->getBool( 'printable' )
Modified paths:
  • /trunk/phase3/includes/Skin.php (modified) (history)
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SkinTemplate.php
@@ -256,7 +256,7 @@
257257 $tpl->setRef( 'skinname', $this->skinname );
258258 $tpl->set( 'skinclass', get_class( $this ) );
259259 $tpl->setRef( 'stylename', $this->stylename );
260 - $tpl->set( 'printable', $wgRequest->getBool( 'printable' ) );
 260+ $tpl->set( 'printable', $out->isPrintable() );
261261 $tpl->set( 'handheld', $wgRequest->getBool( 'handheld' ) );
262262 $tpl->setRef( 'loggedin', $this->loggedin );
263263 $tpl->set( 'notspecialpage', $this->mTitle->getNamespace() != NS_SPECIAL );
@@ -904,7 +904,7 @@
905905 // A print stylesheet is attached to all pages, but nobody ever
906906 // figures that out. :) Add a link...
907907 if( $this->iscontent && ( $action == 'view' || $action == 'purge' ) ) {
908 - if ( !$wgRequest->getBool( 'printable' ) ) {
 908+ if ( !$wgOut->isPrintable() ) {
909909 $nav_urls['print'] = array(
910910 'text' => wfMsg( 'printableversion' ),
911911 'href' => $wgRequest->appendQuery( 'printable=yes' )
Index: trunk/phase3/includes/Skin.php
@@ -1104,7 +1104,7 @@
11051105
11061106 $s = array();
11071107
1108 - if ( !$wgRequest->getBool( 'printable' ) ) {
 1108+ if ( !$wgOut->isPrintable() ) {
11091109 $printurl = $wgRequest->escapeAppendQuery( 'printable=yes' );
11101110 $s[] = "<a href=\"$printurl\" rel=\"alternate\">" . wfMsg( 'printableversion' ) . '</a>';
11111111 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r52683(bug 19390) Omit the "printable version" link on the printable version to hav...ialex09:27, 2 July 2009

Status & tagging log