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_mssql.php | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) (limited to 'program/lib/Roundcube/rcube_db_mssql.php') diff --git a/program/lib/Roundcube/rcube_db_mssql.php b/program/lib/Roundcube/rcube_db_mssql.php index 3c1b9d71f..37a42678a 100644 --- a/program/lib/Roundcube/rcube_db_mssql.php +++ b/program/lib/Roundcube/rcube_db_mssql.php @@ -29,52 +29,38 @@ class rcube_db_mssql extends rcube_db public $db_provider = 'mssql'; /** - * 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 */ - public function __construct($db_dsnw, $db_dsnr = '', $pconn = false) + protected function init() { - parent::__construct($db_dsnw, $db_dsnr, $pconn); - $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 + * Character setting */ - protected function conn_configure($dsn, $dbh) + protected function set_charset($charset) { - // Set date format in case of non-default language (#1488918) - $this->query("SET DATEFORMAT ymd"); + // UTF-8 is default } /** * Return SQL function for current time and date * - * @param int $interval Optional interval (in seconds) to add/subtract - * * @return string SQL function to use in query */ - public function now($interval = 0) + public function now() { - if ($interval) { - $interval = intval($interval); - return "dateadd(second, $interval, getdate())"; - } - return "getdate()"; } /** * Return SQL statement to convert a field value into a unix timestamp * + * This method is deprecated and should not be used anymore due to limitations + * of timestamp functions in Mysql (year 2038 problem) + * * @param string $field Field name * * @return string SQL statement to use in query -- cgit v1.2.3