fix DbPear factory correctly.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Fri, 24 Dec 2010 17:24:01 +0000 (12:24 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Fri, 24 Dec 2010 17:24:01 +0000 (12:24 -0500)
No longer need the driverconfig check, and the recursive call leads to infinite recursion

framework/Core/lib/Horde/Core/Factory/DbPear.php

index 36d6b6a..158b02d 100644 (file)
@@ -80,16 +80,7 @@ class Horde_Core_Factory_DbPear
             ? $dtype
             : $this->getConfig($dtype);
 
-        /* Determine if we we are not using splitread or if we are using the
-         * base SQL config. */
-        if ((($type == 'read') && empty($config['splitread'])) ||
-            (isset($config['driverconfig']) &&
-             ($config['driverconfig'] == 'horde'))) {
-            $this->_instances[$sig] = $this->create($type);
-            return $this->_instances[$sig];
-        }
-
-        if ($type == 'read') {
+        if ($type == 'read' && !empty($config['splitread'])) {
             $config = array_merge($config, $config['read']);
         }