summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2014-11-07 08:40:40 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2014-11-07 08:40:40 (GMT)
commit4a39caf31e02cd2a7cb01665408f6b5f726dcc66 (patch)
treebee907876eb3c61e6d0d4802041d6365a9f74248
parent0a7d936a05647ba054d880c20cd57ad60c2ce8ac (diff)
downloadkolab-syncroton-4a39caf31e02cd2a7cb01665408f6b5f726dcc66.tar.gz
Don't set $part->body, use new rcube_message::get_part_body()
-rw-r--r--lib/kolab_sync_data_email.php13
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/kolab_sync_data_email.php b/lib/kolab_sync_data_email.php
index 8c3a820..9920276 100644
--- a/lib/kolab_sync_data_email.php
+++ b/lib/kolab_sync_data_email.php
@@ -1284,22 +1284,13 @@ class kolab_sync_data_email extends kolab_sync_data implements Syncroton_Data_ID
return '';
}
- if (empty($part->ctype_parameters) || empty($part->ctype_parameters['charset'])) {
- $part->ctype_parameters['charset'] = $message->headers->charset;
- }
-
- // fetch part if not available
- if (!isset($part->body)) {
- $part->body = $message->get_part_content($part->mime_id);
- }
+ $body = $message->get_part_body($part->mime_id, true);
// message is cached but not exists, or other error
- if ($part->body === false) {
+ if ($body === false) {
return '';
}
- $body = $part->body;
-
if ($html) {
if ($part->ctype_secondary == 'html') {
// charset was converted to UTF-8 in rcube_storage::get_message_part(),