Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/237972

Change subject: registration: Actually set the merge strategy for 
$wgExtensionCredits
......................................................................

registration: Actually set the merge strategy for $wgExtensionCredits

$wgExtensionCredits is special and needs to be set in the
ExtensionRegistry. Also change the cache key so any bad cache entries
will be ignored.

Follows up 1ebb0f5659667f.

Change-Id: Iec08ab8d9ef7fe7cccde979530839ef553779658
---
M includes/registration/ExtensionProcessor.php
M includes/registration/ExtensionRegistry.php
2 files changed, 9 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/72/237972/1

diff --git a/includes/registration/ExtensionProcessor.php 
b/includes/registration/ExtensionProcessor.php
index 81ea969..3564c71 100644
--- a/includes/registration/ExtensionProcessor.php
+++ b/includes/registration/ExtensionProcessor.php
@@ -57,7 +57,8 @@
                'wgGroupPermissions' => 'array_plus_2d',
                'wgRevokePermissions' => 'array_plus_2d',
                'wgHooks' => 'array_merge_recursive',
-               'wgExtensionCredits' => 'array_merge_recursive',
+               // credits are handled in the ExtensionRegistry
+               //'wgExtensionCredits' => 'array_merge_recursive',
                'wgExtraNamespaces' => 'array_plus',
                'wgExtraGenderNamespaces' => 'array_plus',
                'wgNamespacesWithSubpages' => 'array_plus',
diff --git a/includes/registration/ExtensionRegistry.php 
b/includes/registration/ExtensionRegistry.php
index 271b3a9..c7e48e0 100644
--- a/includes/registration/ExtensionRegistry.php
+++ b/includes/registration/ExtensionRegistry.php
@@ -22,6 +22,11 @@
        const OLDEST_MANIFEST_VERSION = 1;
 
        /**
+        * Bump whenever the registration cache needs resetting
+        */
+       const CACHE_VERSION = 1;
+
+       /**
         * Special key that defines the merge strategy
         *
         * @since 1.26
@@ -109,7 +114,7 @@
                }
 
                // See if this queue is in APC
-               $key = wfMemcKey( 'registration', md5( json_encode( 
$this->queued ) ) );
+               $key = wfMemcKey( 'registration', md5( json_encode( 
$this->queued ) ), self::CACHE_VERSION );
                $data = $this->cache->get( $key );
                if ( $data ) {
                        $this->exportExtractedData( $data );
@@ -172,6 +177,7 @@
                foreach ( $data['credits'] as $credit ) {
                        
$data['globals']['wgExtensionCredits'][$credit['type']][] = $credit;
                }
+               $data['globals']['wgExtensionCredits'][self::MERGE_STRATEGY] = 
'array_merge_recursive';
                $data['autoload'] = $autoloadClasses;
                return $data;
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/237972
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec08ab8d9ef7fe7cccde979530839ef553779658
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_25
Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to