diff options
author | nikrou <nikrou@piwigo.org> | 2010-07-06 12:17:37 +0000 |
---|---|---|
committer | nikrou <nikrou@piwigo.org> | 2010-07-06 12:17:37 +0000 |
commit | 4845a85685c3d9cb02334dd78a008f58b0b98c10 (patch) | |
tree | 2312a365c5424e68da83b7a12738c2194b42482c /include/functions_session.inc.php | |
parent | b2d7edfc173228035f9dfadb73caa01e88b2b7e4 (diff) |
Bug 1766 fixed : [PostgreSQL] unkown database function UNIX_TIMESTAMP()
Add a new function pwg_db_date_to_ts() to calculate a timestamp from a date
Merge from trunk
git-svn-id: http://piwigo.org/svn/branches/2.1@6667 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_session.inc.php')
-rw-r--r-- | include/functions_session.inc.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/functions_session.inc.php b/include/functions_session.inc.php index 1c01f98ab..f8c3a4c58 100644 --- a/include/functions_session.inc.php +++ b/include/functions_session.inc.php @@ -175,7 +175,7 @@ function pwg_session_gc() $query = ' DELETE FROM '.SESSIONS_TABLE.' - WHERE UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(expiration) > ' + WHERE '.pwg_db_date_to_ts('NOW()').' - '.pwg_db_date_to_ts('expiration').' > ' .$conf['session_length'].' ;'; pwg_query($query); |