From: Alexandre Emsenhuber Date: Sun, 12 Dec 2010 18:54:33 +0000 (+0000) Subject: Moved the check for the "printable" parameter to performRequestForTitle() instead... X-Git-Tag: 1.31.0-rc.0~33352 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=7d6c9314be7801710e4168ee503380802cdeca4d;p=lhc%2Fweb%2Fwiklou.git 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 --- 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' ) ) {