From 2965a981b7ec22866fbdf2d567d87e2d068d3617 Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Fri, 31 Jul 2015 16:04:08 -0400
Subject: [PATCH] Allow to search and import missing PGP pubkeys from keyservers using Publickey.js
---
program/lib/Roundcube/rcube_db_sqlite.php | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/program/lib/Roundcube/rcube_db_sqlite.php b/program/lib/Roundcube/rcube_db_sqlite.php
index e548ed1..ceb332c 100644
--- a/program/lib/Roundcube/rcube_db_sqlite.php
+++ b/program/lib/Roundcube/rcube_db_sqlite.php
@@ -1,6 +1,6 @@
<?php
-/**
+/*
+-----------------------------------------------------------------------+
| This file is part of the Roundcube Webmail client |
| Copyright (C) 2005-2012, The Roundcube Dev Team |
@@ -27,13 +27,6 @@
class rcube_db_sqlite extends rcube_db
{
public $db_provider = 'sqlite';
-
- /**
- * Database character set
- */
- protected function set_charset($charset)
- {
- }
/**
* Prepare connection
@@ -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