Don't cache combined config arrays.
authorChuck Hagenbuch <chuck@horde.org>
Tue, 2 Nov 2010 17:50:16 +0000 (13:50 -0400)
committerJan Schneider <jan@horde.org>
Tue, 2 Nov 2010 18:06:08 +0000 (18:06 +0000)
This was leading to stale Horde config data being in an app's cached config,
causing incorrect URLs to be generated. If this isn't the correct solution, then
I think application config cache keys need to take an md5sum of the Horde config
into account so they are thrown out when they don't match.

framework/Core/lib/Horde/Registry.php

index 7e59ede..0707543 100644 (file)
@@ -1306,11 +1306,11 @@ class Horde_Registry
             if (empty($appConfig)) {
                 $appConfig = array();
             }
-            $this->_cache['conf-' . $app] = Horde_Array::array_merge_recursive_overwrite($this->_cache['conf-horde'], $appConfig);
+            $this->_cache['conf-' . $app] = $appConfig;
             $this->_saveCacheVar('conf-' . $app);
         }
-
-        $GLOBALS['conf'] = &$this->_cache['conf-' . $app];
+        
+        $GLOBALS['conf'] = Horde_Array::array_merge_recursive_overwrite($this->_cache['conf-horde'], $this->_cache['conf-' . $app]);
     }
 
     /**