diff options
author | Hugues Hiegel <root@paranoid> | 2014-08-05 16:46:22 +0200 |
---|---|---|
committer | Hugues Hiegel <root@paranoid> | 2014-08-05 16:46:22 +0200 |
commit | 59478e06c25303a790a0840ab2ac30662c4ef781 (patch) | |
tree | 8d5e964a8f94adaef41efebb0597629f11495c42 /program/lib/Roundcube/rcube_db_mssql.php | |
parent | 7c494b677f9e470ee0d32e62cfa8dc709f39e748 (diff) |
c'est la merde..working
Diffstat (limited to 'program/lib/Roundcube/rcube_db_mssql.php')
-rw-r--r-- | program/lib/Roundcube/rcube_db_mssql.php | 32 |
1 files changed, 9 insertions, 23 deletions
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 |