diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-03-15 10:41:09 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-03-15 10:41:09 +0100 |
commit | f1114237556d32bb217c5dcbb0aa7db2d081608b (patch) | |
tree | a1eb324d1a185bae1b797089753c98c1ec2fac1a | |
parent | a02c77c584906f629d382409e76f0df4d2cfaf01 (diff) |
Fix storing 'safe' flag on a message. The key for session value should include
folder name. A message with the same UID may exist in another folder.
-rw-r--r-- | program/lib/Roundcube/rcube_message.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php index b83334613..42d7b9bbe 100644 --- a/program/lib/Roundcube/rcube_message.php +++ b/program/lib/Roundcube/rcube_message.php @@ -93,7 +93,7 @@ class rcube_message $this->subject = $this->mime->decode_mime_string($this->headers->subject); list(, $this->sender) = each($this->mime->decode_address_list($this->headers->from, 1)); - $this->set_safe((intval($_GET['_safe']) || $_SESSION['safe_messages'][$uid])); + $this->set_safe((intval($_GET['_safe']) || $_SESSION['safe_messages'][$this->folder.':'.$uid])); $this->opt = array( 'safe' => $this->is_safe, 'prefer_html' => $this->app->config->get('prefer_html'), @@ -144,8 +144,7 @@ class rcube_message */ public function set_safe($safe = true) { - $this->is_safe = $safe; - $_SESSION['safe_messages'][$this->uid] = $this->is_safe; + $_SESSION['safe_messages'][$this->folder.':'.$this->uid] = $this->is_safe = $safe; } |