summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/rcube_db_mysql.php
diff options
context:
space:
mode:
Diffstat (limited to 'program/lib/Roundcube/rcube_db_mysql.php')
-rw-r--r--program/lib/Roundcube/rcube_db_mysql.php23
1 files changed, 3 insertions, 20 deletions
diff --git a/program/lib/Roundcube/rcube_db_mysql.php b/program/lib/Roundcube/rcube_db_mysql.php
index 6fa5ad768..7f5ad2b36 100644
--- a/program/lib/Roundcube/rcube_db_mysql.php
+++ b/program/lib/Roundcube/rcube_db_mysql.php
@@ -30,13 +30,9 @@ class rcube_db_mysql extends rcube_db
public $db_provider = 'mysql';
/**
- * Object constructor
- *
- * @param string $db_dsnw DSN for read/write operations
- * @param string $db_dsnr Optional DSN for read only operations
- * @param bool $pconn Enables persistent connections
+ * Driver initialization/configuration
*/
- public function __construct($db_dsnw, $db_dsnr = '', $pconn = false)
+ protected function init()
{
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
rcube::raise_error(array('code' => 600, 'type' => 'db',
@@ -45,25 +41,12 @@ class rcube_db_mysql extends rcube_db
true, true);
}
- parent::__construct($db_dsnw, $db_dsnr, $pconn);
-
// SQL identifiers quoting
$this->options['identifier_start'] = '`';
$this->options['identifier_end'] = '`';
}
/**
- * Driver-specific configuration of database connection
- *
- * @param array $dsn DSN for DB connections
- * @param PDO $dbh Connection handler
- */
- protected function conn_configure($dsn, $dbh)
- {
- $this->query("SET NAMES 'utf8'");
- }
-
- /**
* Abstract SQL statement for value concatenation
*
* @return string SQL statement to be used in query
@@ -151,7 +134,7 @@ class rcube_db_mysql extends rcube_db
$result[PDO::MYSQL_ATTR_FOUND_ROWS] = true;
// Enable AUTOCOMMIT mode (#1488902)
- $result[PDO::ATTR_AUTOCOMMIT] = true;
+ $dsn_options[PDO::ATTR_AUTOCOMMIT] = true;
return $result;
}