Revert r45063 "Move doNothing return check above global declarations"
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 31 Dec 2008 17:56:04 +0000 (17:56 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 31 Dec 2008 17:56:04 +0000 (17:56 +0000)
Change makes the code harder to read by hiding a control statement in the middle of a global declaraction chunk.

includes/OutputPage.php

index ab97478..f8dba71 100644 (file)
@@ -798,13 +798,16 @@ class OutputPage {
         * the object, let's actually output it:
         */
        public function output() {
-               if( $this->mDoNothing ) return;
                global $wgUser, $wgOutputEncoding, $wgRequest;
                global $wgContLanguageCode, $wgDebugRedirects, $wgMimeType;
                global $wgJsMimeType, $wgUseAjax, $wgAjaxWatch;
                global $wgEnableMWSuggest, $wgUniversalEditButton;
                global $wgArticle, $wgTitle;
 
+               if( $this->mDoNothing ){
+                       return;
+               }
+
                wfProfileIn( __METHOD__ );
 
                if ( '' != $this->mRedirect ) {