convertExtensionToRegistration: Still convert $wgTrackingCategories
authorKunal Mehta <legoktm@gmail.com>
Thu, 29 Jan 2015 23:21:14 +0000 (15:21 -0800)
committerKunal Mehta <legoktm@gmail.com>
Thu, 29 Jan 2015 23:21:14 +0000 (15:21 -0800)
It's an attribute now rather than a global, but we still want
to convert it.

This follows up 247ecab445dcfe.

Change-Id: Ibb61b1689e3e6b454d7bf2f300ab465e30ca774a

maintenance/convertExtensionToRegistration.php

index a0dee3c..3cc0b5c 100644 (file)
@@ -14,6 +14,15 @@ class ConvertExtensionToRegistration extends Maintenance {
                'ExtensionFunctions' => 'handleExtensionFunctions',
        );
 
+       /**
+        * Things that were formerly globals and should still be converted
+        *
+        * @var array
+        */
+       protected $formerGlobals = array(
+               'TrackingCategories',
+       );
+
        /**
         * Keys that should be put at the top of the generated JSON file (T86608)
         *
@@ -44,7 +53,7 @@ class ConvertExtensionToRegistration extends Maintenance {
                $processor = new ReflectionClass( 'ExtensionProcessor' );
                $settings = $processor->getProperty( 'globalSettings' );
                $settings->setAccessible( true );
-               return $settings->getValue();
+               return $settings->getValue() + $this->formerGlobals;
        }
 
        public function execute() {