summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-11-21 14:33:58 +0000
committeralecpl <alec@alec.pl>2008-11-21 14:33:58 +0000
commitbe7d3b6918ff90757d10804ac914edb5a65f4828 (patch)
treeabc0e0ab2a4876a05692503d748f3370e8999aa2 /program/include
parentbd0c2b0a341c5440c66f9b0e9d2ad2b869401f03 (diff)
- Fix 'cache' table cleanup on session destroy (#1485516)
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_imap.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index f1483af9b..d8845cc74 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -2146,11 +2146,11 @@ class rcube_imap
{
$this->db->query(
"UPDATE ".get_table_name('cache')."
- SET created=".$this->db->now().",
- data=?
+ SET created=".$this->db->now().", data=?, session_id=?
WHERE user_id=?
AND cache_key=?",
$data,
+ session_id(),
$_SESSION['user_id'],
$key);
}
@@ -2159,11 +2159,12 @@ class rcube_imap
{
$this->db->query(
"INSERT INTO ".get_table_name('cache')."
- (created, user_id, cache_key, data)
- VALUES (".$this->db->now().", ?, ?, ?)",
+ (created, user_id, cache_key, data, session_id)
+ VALUES (".$this->db->now().", ?, ?, ?, ?)",
$_SESSION['user_id'],
$key,
- $data);
+ $data,
+ session_id());
}
}