summaryrefslogtreecommitdiff
path: root/roundcubemail/program
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-03-25 18:39:33 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-03-25 18:39:33 +0000
commit70c723bc60624dee43b24ed1a482dca83c5142b4 (patch)
tree97b655adb187c0ce561b2b07d5967d9727f52590 /roundcubemail/program
parent6fdfc809544afdb418e5bbb6ed326d493eef6dff (diff)
Only emulate prepared queries in debug mode
git-svn-id: https://svn.roundcube.net/trunk@1217 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
-rw-r--r--roundcubemail/program/include/rcube_mdb2.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/roundcubemail/program/include/rcube_mdb2.inc b/roundcubemail/program/include/rcube_mdb2.inc
index 15e55b039..72d906664 100644
--- a/roundcubemail/program/include/rcube_mdb2.inc
+++ b/roundcubemail/program/include/rcube_mdb2.inc
@@ -96,8 +96,8 @@ class rcube_mdb2
{
// Use persistent connections if available
$dbh = MDB2::connect($dsn, array(
- 'emulate_prepared' => true,
'persistent' => $this->db_pconn,
+ 'emulate_prepared' => $this->debug_mode,
'debug' => $this->debug_mode,
'debug_handler' => 'mdb2_debug_handler',
'portability' => MDB2_PORTABILITY_ALL ^ MDB2_PORTABILITY_EMPTY_TO_NULL));
@@ -169,7 +169,10 @@ class rcube_mdb2
{
$this->debug_mode = $dbg;
if ($this->db_connected)
+ {
$this->db_handle->setOption('debug', $dbg);
+ $this->db_handle->setOption('emulate_prepared', $dbg);
+ }
}