From 66407a75d1eced92d0bd725caa028f54a3b345be Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sat, 8 Jun 2013 19:53:04 +0200 Subject: Fix date format issues on MS SQL Server (#1488918) --- program/lib/Roundcube/rcube_db.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'program/lib/Roundcube/rcube_db.php') diff --git a/program/lib/Roundcube/rcube_db.php b/program/lib/Roundcube/rcube_db.php index 086fd66cb..597fa75f9 100644 --- a/program/lib/Roundcube/rcube_db.php +++ b/program/lib/Roundcube/rcube_db.php @@ -368,8 +368,10 @@ class rcube_db */ protected function _query($query, $offset, $numrows, $params) { + $query = trim($query); + // Read or write ? - $mode = preg_match('/^(select|show)/i', ltrim($query)) ? 'r' : 'w'; + $mode = preg_match('/^(select|show|set)/i', $query) ? 'r' : 'w'; $this->db_connect($mode); -- cgit v1.2.3