diff options
author | thomascube <thomas@roundcube.net> | 2005-10-07 14:17:08 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2005-10-07 14:17:08 +0000 |
commit | 42b11351497ce67e96a0465c76694632cdfb3ecb (patch) | |
tree | e70135646b2422dccab017cb9f6999ad50e91564 /program/include/session.inc | |
parent | 597170feb25f5c2e5a90a9c0b1fd62001f169afb (diff) |
Several bugfixes and feature improvements
Diffstat (limited to 'program/include/session.inc')
-rw-r--r-- | program/include/session.inc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/program/include/session.inc b/program/include/session.inc index 35970c80f..ca2b0b4ce 100644 --- a/program/include/session.inc +++ b/program/include/session.inc @@ -38,7 +38,7 @@ function sess_read($key) { global $DB, $SESS_CHANGED; - $sql_result = $DB->query(sprintf("SELECT vars, UNIX_TIMESTAMP(changed) AS changed + $sql_result = $DB->query(sprintf("SELECT vars, ip, UNIX_TIMESTAMP(changed) AS changed FROM %s WHERE sess_id='%s'", get_table_name('session'), @@ -81,11 +81,12 @@ function sess_write($key, $vars) else { $DB->query(sprintf("INSERT INTO %s - (sess_id, vars, created, changed) - VALUES ('%s', '%s', NOW(), NOW())", + (sess_id, vars, ip, created, changed) + VALUES ('%s', '%s', '%s', NOW(), NOW())", get_table_name('session'), $key, - $vars)); + $vars, + $_SERVER['REMOTE_ADDR'])); } return TRUE; |