Request #7997 - add SQL ssl support
authorChuck Hagenbuch <chuck@horde.org>
Tue, 17 Feb 2009 17:09:21 +0000 (12:09 -0500)
committerChuck Hagenbuch <chuck@horde.org>
Tue, 17 Feb 2009 17:09:21 +0000 (12:09 -0500)
imp/lib/Quota/sql.php
imp/lib/Sentmail/sql.php

index 2d2b3c2..162b1e3 100644 (file)
@@ -63,7 +63,9 @@ class IMP_Quota_sql extends IMP_Quota
     {
         if (!$this->_connected) {
             require_once 'DB.php';
-            $this->_db = &DB::connect($this->_params);
+            $this->_db = &DB::connect($this->_params,
+                                      array('persistent' => !empty($this->_params['persistent']),
+                                            'ssl' => !empty($this->_params['ssl'])));
             if (is_a($this->_db, 'PEAR_Error')) {
                 return PEAR::raiseError(_("Unable to connect to SQL server."));
             }
index 979940a..3de53ca 100644 (file)
@@ -206,7 +206,8 @@ class IMP_Sentmail_sql extends IMP_Sentmail
         /* Connect to the SQL server using the supplied parameters. */
         require_once 'DB.php';
         $this->_db = DB::connect($this->_params,
-                                 array('persistent' => !empty($this->_params['persistent'])));
+                                 array('persistent' => !empty($this->_params['persistent']),
+                                       'ssl' => !empty($this->_params['ssl'])));
         if (is_a($this->_db, 'PEAR_Error')) {
             return $this->_db;
         }