* Fix pathing and versioning for incubator
authorBen Klang <ben@alkaloid.net>
Fri, 27 Jun 2008 04:03:51 +0000 (04:03 +0000)
committerBen Klang <ben@alkaloid.net>
Sun, 10 Jan 2010 04:05:27 +0000 (23:05 -0500)
* Fix merging Horde driver configuration for SQL-based drivers

lib/Driver.php
lib/base.php
lib/version.php

index 667970e..8f432f9 100644 (file)
@@ -3,7 +3,7 @@
  * Operator_Driver:: defines an API for implementing storage backends for
  * Operator.
  *
- * $Horde: incubator/operator/lib/Driver.php,v 1.1 2008/04/19 01:26:06 bklang Exp $
+ * $Horde: incubator/operator/lib/Driver.php,v 1.2 2008/06/27 04:03:51 bklang Exp $
  *
  * Copyright 2007-2008 The Horde Project (http://www.horde.org/)
  *
@@ -54,8 +54,15 @@ class Operator_Driver {
         }
         $driver = basename($driver);
 
-        if ($params === null) {
-            $params = Horde::getDriverConfig('storage', $driver);
+        if (is_null($params)) {
+            // Since we have more than one backend that uses SQL make sure
+            // all of them have a chance to inherit the site-wide config.
+            $sqldrivers = array('sql', 'asterisksql');
+            if (in_array($driver, $sqldrivers)) {
+                $params = Horde::getDriverConfig('storage', 'sql');
+            } else {
+                $params = Horde::getDriverConfig('storage', $driver);
+            }
         }
 
         $class = 'Operator_Driver_' . $driver;
index 05e6e0b..53376ae 100644 (file)
@@ -2,7 +2,7 @@
 /**
  * Operator base application file.
  *
- * $Horde: incubator/operator/lib/base.php,v 1.1 2008/04/19 01:26:06 bklang Exp $
+ * $Horde: incubator/operator/lib/base.php,v 1.2 2008/06/27 04:03:51 bklang Exp $
  *
  * This file brings in all of the dependencies that every Operator script will
  * need, and sets up objects that all scripts use.
@@ -11,7 +11,7 @@
 // Check for a prior definition of HORDE_BASE (perhaps by an auto_prepend_file
 // definition for site customization).
 if (!defined('HORDE_BASE')) {
-    @define('HORDE_BASE', dirname(__FILE__) . '/../..');
+    @define('HORDE_BASE', dirname(__FILE__) . '/../../..');
 }
 
 // Load the Horde Framework core, and set up inclusion paths.
index a283b1c..59bf5b2 100644 (file)
@@ -1 +1 @@
-<?php define('SKELETON_VERSION', '0.1-cvs') ?>
\ No newline at end of file
+<?php define('OPERATOR_VERSION', '0.1-cvs') ?>