Merge "Add tests for WikiMap and WikiReference"
[lhc/web/wiklou.git] / includes / registration / ExtensionRegistry.php
index 7414925..f838103 100644 (file)
@@ -81,7 +81,7 @@ class ExtensionRegistry {
                // we don't want to fail here if $wgObjectCaches is not configured
                // properly for APC setup
                try {
-                       $this->cache = ObjectCache::newAccelerator( array() );
+                       $this->cache = ObjectCache::newAccelerator();
                } catch ( MWException $e ) {
                        $this->cache = new EmptyBagOStuff();
                }
@@ -222,14 +222,7 @@ class ExtensionRegistry {
                                        $GLOBALS[$key] = array_merge_recursive( $GLOBALS[$key], $val );
                                        break;
                                case 'array_plus_2d':
-                                       // First merge items that are in both arrays
-                                       foreach ( $GLOBALS[$key] as $name => &$groupVal ) {
-                                               if ( isset( $val[$name] ) ) {
-                                                       $groupVal += $val[$name];
-                                               }
-                                       }
-                                       // Now add items that didn't exist yet
-                                       $GLOBALS[$key] += $val;
+                                       $GLOBALS[$key] = wfArrayPlus2d( $GLOBALS[$key], $val );
                                        break;
                                case 'array_plus':
                                        $GLOBALS[$key] = $val + $GLOBALS[$key];