From 9db32681e4821f0c88575c07c30c91f5916855b4 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Fri, 1 Jan 2016 22:53:20 -0800 Subject: [PATCH] registration: Handle $wgExtensionCredits inside the ExtensionProcessor Bug: T108269 Change-Id: I92675dac5cca52448e24902d0a5c865fd6df46d9 --- includes/registration/ExtensionProcessor.php | 4 ++-- includes/registration/ExtensionRegistry.php | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) 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; -- 2.20.1