summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-06-25 19:45:39 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-06-25 19:45:39 +0000
commit98c47becece0dd17910e2e2701d8a94b2c51fef1 (patch)
treed69a4d37196ebdffe2e75f094957253f04a505c7
parent463356c70a91c69579a69a7196c2167f12425866 (diff)
- fix rcube_message_part cloning
git-svn-id: https://svn.roundcube.net/trunk@2677 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/program/include/rcube_imap.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/roundcubemail/program/include/rcube_imap.php b/roundcubemail/program/include/rcube_imap.php
index 556c8b0d6..8ffcfe0cb 100644
--- a/roundcubemail/program/include/rcube_imap.php
+++ b/roundcubemail/program/include/rcube_imap.php
@@ -938,7 +938,7 @@ class rcube_imap
if ($headers = iil_C_FetchHeader($this->conn, $mailbox, join(',', $for_update), false, $this->fetch_add_headers))
foreach ($headers as $header)
$this->add_message_cache($cache_key, $header->id, $header, NULL,
- in_array((string)$header->uid, $for_remove, true));
+ in_array((string)$header->uid, (array)$for_remove, true));
}
}
@@ -2291,8 +2291,7 @@ class rcube_imap
{
$internal_key = '__single_msg';
- if ($this->caching_enabled && (!isset($this->cache[$internal_key][$uid]) ||
- ($struct && empty($this->cache[$internal_key][$uid]->structure))))
+ if ($this->caching_enabled && !isset($this->cache[$internal_key][$uid]))
{
$sql_result = $this->db->query(
"SELECT idx, headers, structure
@@ -3037,6 +3036,13 @@ class rcube_message_part
var $d_parameters = array();
var $ctype_parameters = array();
+ function __clone()
+ {
+ if (isset($this->parts))
+ foreach ($this->parts as $idx => $part)
+ if (is_object($part))
+ $this->parts[$idx] = clone $part;
+ }
}