From 59478e06c25303a790a0840ab2ac30662c4ef781 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Tue, 5 Aug 2014 16:46:22 +0200 Subject: c'est la merde.. --- program/lib/Roundcube/rcube_db_mysql.php | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) (limited to 'program/lib/Roundcube/rcube_db_mysql.php') 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,24 +41,11 @@ 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 * @@ -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; } -- cgit v1.2.3