From: Kunal Mehta Date: Sat, 2 Jan 2016 06:53:20 +0000 (-0800) Subject: registration: Handle $wgExtensionCredits inside the ExtensionProcessor X-Git-Tag: 1.31.0-rc.0~8492 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=9db32681e4821f0c88575c07c30c91f5916855b4;p=lhc%2Fweb%2Fwiklou.git registration: Handle $wgExtensionCredits inside the ExtensionProcessor Bug: T108269 Change-Id: I92675dac5cca52448e24902d0a5c865fd6df46d9 --- diff --git a/includes/registration/ExtensionProcessor.php b/includes/registration/ExtensionProcessor.php index 074a962d5f..13c450a415 100644 --- a/includes/registration/ExtensionProcessor.php +++ b/includes/registration/ExtensionProcessor.php @@ -57,8 +57,7 @@ class ExtensionProcessor implements Processor { 'wgGroupPermissions' => 'array_plus_2d', 'wgRevokePermissions' => 'array_plus_2d', 'wgHooks' => 'array_merge_recursive', - // credits are handled in the ExtensionRegistry - // 'wgExtensionCredits' => 'array_merge_recursive', + 'wgExtensionCredits' => 'array_merge_recursive', 'wgExtraGenderNamespaces' => 'array_plus', 'wgNamespacesWithSubpages' => 'array_plus', 'wgNamespaceContentModels' => 'array_plus', @@ -321,6 +320,7 @@ class ExtensionProcessor implements Processor { } $this->credits[$name] = $credits; + $this->globals['wgExtensionCredits'][$credits['type']][] = $credits; } /** diff --git a/includes/registration/ExtensionRegistry.php b/includes/registration/ExtensionRegistry.php index e37e7f5945..86be86bba8 100644 --- a/includes/registration/ExtensionRegistry.php +++ b/includes/registration/ExtensionRegistry.php @@ -29,7 +29,7 @@ class ExtensionRegistry { /** * Bump whenever the registration cache needs resetting */ - const CACHE_VERSION = 2; + const CACHE_VERSION = 3; /** * Special key that defines the merge strategy @@ -225,10 +225,6 @@ class ExtensionRegistry { $data = $processor->getExtractedInfo(); // Need to set this so we can += to it later $data['globals']['wgAutoloadClasses'] = array(); - foreach ( $data['credits'] as $credit ) { - $data['globals']['wgExtensionCredits'][$credit['type']][] = $credit; - } - $data['globals']['wgExtensionCredits'][self::MERGE_STRATEGY] = 'array_merge_recursive'; $data['autoload'] = $autoloadClasses; $data['autoloaderPaths'] = $autoloaderPaths; return $data;