aboutsummaryrefslogtreecommitdiffstats
path: root/include/dblayer/functions_pdo-sqlite.inc.php
diff options
context:
space:
mode:
authornikrou <nikrou@piwigo.org>2010-06-25 19:43:44 +0000
committernikrou <nikrou@piwigo.org>2010-06-25 19:43:44 +0000
commit1ba096945f7f8c17c392d4e5229c77e73e0bc6c9 (patch)
treefb99cb19ebaf6551ee5ea07704c0f7cda7b52c7e /include/dblayer/functions_pdo-sqlite.inc.php
parentfb1d1c43d6c098d677eb630de51a0e0a6d24bbf1 (diff)
Bug 1744 fixed : Incorrect use of timezone with SQLite
Fixed anti-flood system. Need refactoring between each interval functions git-svn-id: http://piwigo.org/svn/trunk@6604 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/dblayer/functions_pdo-sqlite.inc.php')
-rw-r--r--include/dblayer/functions_pdo-sqlite.inc.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/dblayer/functions_pdo-sqlite.inc.php b/include/dblayer/functions_pdo-sqlite.inc.php
index ea47564f0..ce02af55c 100644
--- a/include/dblayer/functions_pdo-sqlite.inc.php
+++ b/include/dblayer/functions_pdo-sqlite.inc.php
@@ -499,6 +499,11 @@ function pwg_db_get_recent_period($period, $date='CURRENT_DATE')
return $d;
}
+function pwg_db_get_flood_period_expression($seconds)
+{
+ return 'datetime(\'now\', \'localtime\', \''.-$seconds.' seconds\')';
+}
+
function pwg_db_get_hour($date)
{
return 'strftime(\'%H\', '.$date.')';