SpecialExpandTemplates: Use Config instead of globals
authorKunal Mehta <legoktm@gmail.com>
Sun, 3 Aug 2014 21:55:15 +0000 (14:55 -0700)
committerKunal Mehta <legoktm@gmail.com>
Sun, 3 Aug 2014 21:55:15 +0000 (14:55 -0700)
Change-Id: I84b1008a11aa12708231b6f460715a5cdd4f4e01

includes/specials/SpecialExpandTemplates.php

index ecbd353..60eec39 100644 (file)
@@ -52,7 +52,7 @@ class SpecialExpandTemplates extends SpecialPage {
         * Show the special page
         */
        function execute( $subpage ) {
-               global $wgParser, $wgUseTidy, $wgAlwaysUseTidy;
+               global $wgParser;
 
                $this->setHeaders();
 
@@ -112,7 +112,8 @@ class SpecialExpandTemplates extends SpecialPage {
                                );
                        }
 
-                       if ( ( $wgUseTidy && $options->getTidy() ) || $wgAlwaysUseTidy ) {
+                       $config = $this->getConfig();
+                       if ( ( $config->get( 'UseTidy' ) && $options->getTidy() ) || $config->get( 'AlwaysUseTidy' ) ) {
                                $tmp = MWTidy::tidy( $tmp );
                        }