summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/rcube_db.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-06-08 19:53:04 +0200
committerAleksander Machniak <alec@alec.pl>2013-06-08 19:53:04 +0200
commit66407a75d1eced92d0bd725caa028f54a3b345be (patch)
tree40815913d7fe247301e01ec85e6f8df11ca42f79 /program/lib/Roundcube/rcube_db.php
parentb68e2355d7dcc40de404a93b9d39add2a6e45510 (diff)
Fix date format issues on MS SQL Server (#1488918)
Diffstat (limited to 'program/lib/Roundcube/rcube_db.php')
-rw-r--r--program/lib/Roundcube/rcube_db.php4
1 files changed, 3 insertions, 1 deletions
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);