SpecialTrackingCategories: Use Config instead of globals
authorKunal Mehta <legoktm@gmail.com>
Wed, 6 Aug 2014 15:02:44 +0000 (16:02 +0100)
committerKunal Mehta <legoktm@gmail.com>
Wed, 6 Aug 2014 15:02:44 +0000 (16:02 +0100)
Change-Id: I89513fcde54c7b0ec856f08612802b5f1b47503d

includes/specials/SpecialTrackingCategories.php

index 73bdbd6..5e5588c 100644 (file)
@@ -37,9 +37,6 @@ class SpecialTrackingCategories extends SpecialPage {
        }
 
        function execute( $par ) {
-               // Global array containing names of tracking categories
-               global $wgTrackingCategories;
-
                $this->setHeaders();
                $this->outputHeader();
                $this->getOutput()->allowClickjacking();
@@ -59,7 +56,7 @@ class SpecialTrackingCategories extends SpecialPage {
                        </tr></thead>"
                );
 
-               foreach ( $wgTrackingCategories as $catMsg ) {
+               foreach ( $this->getConfig()->get( 'TrackingCategories' ) as $catMsg ) {
                        /*
                         * Check if the tracking category varies by namespace
                         * Otherwise only pages in the current namespace will be displayed