r78267 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78266‎ | r78267 | r78268 >
Date:18:54, 12 December 2010
Author:ialex
Status:ok
Tags:
Comment:
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
Modified paths:
  • /trunk/phase3/includes/Wiki.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Wiki.php
@@ -49,6 +49,9 @@
5050 wfProfileIn( __METHOD__ );
5151
5252 $output->setTitle( $title );
 53+ if( $request->getVal( 'printable' ) === 'yes' ) {
 54+ $output->setPrintable();
 55+ }
5356
5457 wfRunHooks( 'BeforeInitialize', array( &$title, &$article, &$output, &$user, $request, $this ) );
5558
@@ -101,10 +104,7 @@
102105 * @return Title object to be $wgTitle
103106 */
104107 function checkInitialQueries( $title, $action ) {
105 - global $wgOut, $wgRequest, $wgContLang;
106 - if( $wgRequest->getVal( 'printable' ) === 'yes' ) {
107 - $wgOut->setPrintable();
108 - }
 108+ global $wgRequest, $wgContLang;
109109
110110 $curid = $wgRequest->getInt( 'curid' );
111111 if( $wgRequest->getCheck( 'search' ) ) {

Status & tagging log