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
This commit is contained in:
nikrou
2010-06-25 19:43:44 +00:00
parent fb1d1c43d6
commit 1ba096945f
6 changed files with 28 additions and 7 deletions
+5
View File
@@ -546,6 +546,11 @@ function pwg_db_get_recent_period($period, $date='CURRENT_DATE')
return $d;
}
function pwg_db_get_flood_period_expression($seconds)
{
return 'now() - \''.$seconds.' SECOND\'::interval';
}
function pwg_db_get_hour($date)
{
return 'EXTRACT(HOUR FROM '.$date.')';