summaryrefslogtreecommitdiff
path: root/program/include/session.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2006-08-30 17:41:21 +0000
committerthomascube <thomas@roundcube.net>2006-08-30 17:41:21 +0000
commit107bde9cfd9a0392d18544b5a433552ce6f2f0a6 (patch)
tree3535c6d41d37502d4c20a6844d8652f219b84856 /program/include/session.inc
parent949dea5803fd958d02372870c6b5b8a8ad6f8745 (diff)
Added MSSQL support
Diffstat (limited to 'program/include/session.inc')
-rw-r--r--program/include/session.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/program/include/session.inc b/program/include/session.inc
index dc362f8f9..00ca29915 100644
--- a/program/include/session.inc
+++ b/program/include/session.inc
@@ -70,7 +70,7 @@ function sess_write($key, $vars)
session_decode($vars);
$DB->query("UPDATE ".get_table_name('session')."
SET vars=?,
- changed=now()
+ changed=".$DB->now()."
WHERE sess_id=?",
$vars,
$key);
@@ -79,7 +79,7 @@ function sess_write($key, $vars)
{
$DB->query("INSERT INTO ".get_table_name('session')."
(sess_id, vars, ip, created, changed)
- VALUES (?, ?, ?, now(), now())",
+ VALUES (?, ?, ?, ".$DB->now().", ".$DB->now().")",
$key,
$vars,
$_SERVER['REMOTE_ADDR']);
@@ -118,7 +118,7 @@ function sess_gc($maxlifetime)
// get all expired sessions
$sql_result = $DB->query("SELECT sess_id
FROM ".get_table_name('session')."
- WHERE ".$DB->unixtimestamp('now()')."-".$DB->unixtimestamp('changed')." > ?",
+ WHERE ".$DB->unixtimestamp($DB->now())."-".$DB->unixtimestamp('changed')." > ?",
$maxlifetime);
$a_exp_sessions = array();