From 6491fbdbae0a2a6e747e283bae0f511ce852c0e9 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Fri, 08 Apr 2011 02:33:50 -0400
Subject: [PATCH] - Fixed bug where some dates would produce SQL error in MySQL (#1487856)

---
 CHANGELOG                      |    1 +
 program/include/rcube_mdb2.php |   10 +---------
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 11b11fc..a38bbd6 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
 CHANGELOG Roundcube Webmail
 ===========================
 
+- Fixed bug where some dates would produce SQL error in MySQL (#1487856)
 - Added workaround for some IMAP server with broken STATUS response (#1487859)
 - Fix bug where default_charset was not used for text messages (#1487836)
 - Enable TinyMCE's contextmenu (#1487014)
diff --git a/program/include/rcube_mdb2.php b/program/include/rcube_mdb2.php
index 85a70ca..36a5950 100644
--- a/program/include/rcube_mdb2.php
+++ b/program/include/rcube_mdb2.php
@@ -570,15 +570,7 @@
      */
     function fromunixtime($timestamp)
     {
-        switch($this->db_provider) {
-            case 'mysqli':
-            case 'mysql':
-            case 'sqlite':
-                return sprintf("FROM_UNIXTIME(%d)", $timestamp);
-
-            default:
-                return date("'Y-m-d H:i:s'", $timestamp);
-        }
+        return date("'Y-m-d H:i:s'", $timestamp);
     }
 
 

--
Gitblit v1.9.1