From 0b36d151572e050b51d82e7429fee847ebb33e22 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Thu, 20 Nov 2014 06:03:22 -0500
Subject: [PATCH] Add method to display operation (uploading) progress in UI message

---
 program/lib/Roundcube/rcube_db_sqlite.php |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/program/lib/Roundcube/rcube_db_sqlite.php b/program/lib/Roundcube/rcube_db_sqlite.php
index e548ed1..b66c560 100644
--- a/program/lib/Roundcube/rcube_db_sqlite.php
+++ b/program/lib/Roundcube/rcube_db_sqlite.php
@@ -29,13 +29,6 @@
     public $db_provider = 'sqlite';
 
     /**
-     * Database character set
-     */
-    protected function set_charset($charset)
-    {
-    }
-
-    /**
      * Prepare connection
      */
     protected function conn_prepare($dsn)
@@ -94,11 +87,17 @@
     /**
      * 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()
+    public function now($interval = 0)
     {
-        return "datetime('now')";
+        if ($interval) {
+            $add = ($interval > 0 ? '+' : '') . intval($interval) . ' seconds';
+        }
+
+        return "datetime('now'" . ($add ? ",'$add'" : "") . ")";
     }
 
     /**

--
Gitblit v1.9.1