summaryrefslogtreecommitdiff
path: root/program/include/rcube_imap.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-09-08 08:31:13 +0000
committeralecpl <alec@alec.pl>2011-09-08 08:31:13 +0000
commit71f72f928b2e637471268416131841b4ddca2bd0 (patch)
tree45a715e6bafcd1a88625e6516f53125f68df66b7 /program/include/rcube_imap.php
parente730cd248dae97e84c193437b4f129ef9a5fd0f6 (diff)
- Fix new caching issue when broken/misleading object data was stored in database.
The object must be cleaned up before storing in DB, because some code (out of rcube_message and rcube_imap classes) is changing objects data e.g. parts mimetype or body. Now it's become a problem because we're saving the object in cache at shutdown (after all modifications). - Make stored message object smaller by removing some redundant data.
Diffstat (limited to 'program/include/rcube_imap.php')
-rw-r--r--program/include/rcube_imap.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index a15a5923c..d14a643de 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -1999,12 +1999,11 @@ class rcube_imap
}
$struct = &$this->_structure_part($structure, 0, '', $headers);
- $struct->headers = get_object_vars($headers);
// don't trust given content-type
- if (empty($struct->parts) && !empty($struct->headers['ctype'])) {
+ if (empty($struct->parts) && !empty($headers->ctype)) {
$struct->mime_id = '1';
- $struct->mimetype = strtolower($struct->headers['ctype']);
+ $struct->mimetype = strtolower($headers->ctype);
list($struct->ctype_primary, $struct->ctype_secondary) = explode('/', $struct->mimetype);
}