From 7d6c9314be7801710e4168ee503380802cdeca4d Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 12 Dec 2010 18:54:33 +0000 Subject: [PATCH] Moved the check for the "printable" parameter to performRequestForTitle() instead of checkInitialQueries(), I don't know why we need to do this check that early --- includes/Wiki.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/Wiki.php b/includes/Wiki.php index 26912b35d1..9cd05030cb 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -49,6 +49,9 @@ class MediaWiki { wfProfileIn( __METHOD__ ); $output->setTitle( $title ); + if( $request->getVal( 'printable' ) === 'yes' ) { + $output->setPrintable(); + } wfRunHooks( 'BeforeInitialize', array( &$title, &$article, &$output, &$user, $request, $this ) ); @@ -101,10 +104,7 @@ class MediaWiki { * @return Title object to be $wgTitle */ function checkInitialQueries( $title, $action ) { - global $wgOut, $wgRequest, $wgContLang; - if( $wgRequest->getVal( 'printable' ) === 'yes' ) { - $wgOut->setPrintable(); - } + global $wgRequest, $wgContLang; $curid = $wgRequest->getInt( 'curid' ); if( $wgRequest->getCheck( 'search' ) ) { -- 2.20.1