summaryrefslogtreecommitdiff
path: root/roundcubemail/program
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2006-12-01 18:29:06 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2006-12-01 18:29:06 +0000
commit9462d53f43f632bed799c4f6b744e71448e287d9 (patch)
tree34f86b8c6a6a8dead0fdcf6d0add8f1a630aad98 /roundcubemail/program
parentb8019365c23e1f47ce4f01377015f38a62240790 (diff)
Applied the latest changes to MDB2 wrapper
git-svn-id: https://svn.roundcube.net/trunk@390 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
-rwxr-xr-xroundcubemail/program/include/rcube_mdb2.inc9
1 files changed, 5 insertions, 4 deletions
diff --git a/roundcubemail/program/include/rcube_mdb2.inc b/roundcubemail/program/include/rcube_mdb2.inc
index d37230268..c71e723d0 100755
--- a/roundcubemail/program/include/rcube_mdb2.inc
+++ b/roundcubemail/program/include/rcube_mdb2.inc
@@ -59,14 +59,15 @@ class rcube_db
* @param string DSN for read/write operations
* @param string Optional DSN for read only operations
*/
- function __construct($db_dsnw, $db_dsnr='')
+ function __construct($db_dsnw, $db_dsnr='', $pconn=false)
{
if ($db_dsnr=='')
$db_dsnr=$db_dsnw;
$this->db_dsnw = $db_dsnw;
$this->db_dsnr = $db_dsnr;
-
+ $this->db_pconn = $pconn;
+
$dsn_array = MDB2::parseDSN($db_dsnw);
$this->db_provider = $dsn_array['phptype'];
}
@@ -93,7 +94,7 @@ class rcube_db
function dsn_connect($dsn)
{
// Use persistent connections if available
- $dbh = MDB2::connect($dsn, array('persistent' => TRUE, 'portability' => MDB2_PORTABILITY_ALL ^ MDB2_PORTABILITY_EMPTY_TO_NULL));
+ $dbh = MDB2::connect($dsn, array('persistent' => $this->db_pconn, 'portability' => MDB2_PORTABILITY_ALL ^ MDB2_PORTABILITY_EMPTY_TO_NULL));
if (PEAR::isError($dbh))
{
@@ -285,7 +286,7 @@ class rcube_db
if (!$this->db_handle)
return FALSE;
- return $result;
+ return $this->_get_result($result);
}