diff options
-rw-r--r-- | program/include/cache.inc | 4 | ||||
-rw-r--r-- | program/include/main.inc | 4 | ||||
-rw-r--r-- | program/include/session.inc | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/program/include/cache.inc b/program/include/cache.inc index 9b01c9e0c..8d088e57b 100644 --- a/program/include/cache.inc +++ b/program/include/cache.inc @@ -69,7 +69,7 @@ function rcube_write_cache($key, $data, $session_cache=FALSE) if ($CACHE_KEYS[$key]) { $DB->query("UPDATE ".get_table_name('cache')." - SET created=NOW(), + SET created=now(), data=? WHERE user_id=? AND cache_key=?", @@ -82,7 +82,7 @@ function rcube_write_cache($key, $data, $session_cache=FALSE) { $DB->query("INSERT INTO ".get_table_name('cache')." (created, user_id, session_id, cache_key, data) - VALUES (NOW(), ?, ?, ?, ?)", + VALUES (now(), ?, ?, ?, ?)", $_SESSION['user_id'], $session_cache ? $sess_id : 'NULL', $key, diff --git a/program/include/main.inc b/program/include/main.inc index ce9eaf069..d00efc747 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -299,7 +299,7 @@ function rcmail_login($user, $pass, $host=NULL) // update user's record $DB->query("UPDATE ".get_table_name('users')." - SET last_login=NOW() + SET last_login=now() WHERE user_id=?", $user_id); } @@ -336,7 +336,7 @@ function rcmail_create_user($user, $host) $DB->query("INSERT INTO ".get_table_name('users')." (created, last_login, username, mail_host, language) - VALUES (NOW(), NOW(), ?, ?, ?)", + VALUES (now(), now(), ?, ?, ?)", $user, $host, $_SESSION['user_lang']); diff --git a/program/include/session.inc b/program/include/session.inc index ccca0a920..54ed798fc 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=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 (?, ?, ?, now(), now())", $key, $vars, $_SERVER['REMOTE_ADDR']); @@ -115,7 +115,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('created')." > ?", + WHERE ".$DB->unixtimestamp('now()')."-".$DB->unixtimestamp('created')." > ?", $maxlifetime); $a_exp_sessions = array(); |