summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2014-10-22 12:58:47 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2014-10-22 12:58:47 (GMT)
commit2a46aceb2b2cafc8ca1723894616c718e5d7f201 (patch)
tree3e83ea1be4c994b02783c5f0d73637f9995b33f2 /plugins
parent7af77056677e3d27c6026a2bdef719e570a2b44f (diff)
downloadroundcubemail-plugins-kolab-2a46aceb2b2cafc8ca1723894616c718e5d7f201.tar.gz
Use new rcube_message::get_part_body() method
Diffstat (limited to 'plugins')
-rw-r--r--plugins/kolab_files/lib/kolab_files_engine.php2
-rw-r--r--plugins/libcalendaring/libcalendaring.php2
-rw-r--r--plugins/libkolab/lib/kolab_storage_folder.php2
-rw-r--r--plugins/pdfviewer/pdfviewer.php2
4 files changed, 4 insertions, 4 deletions
diff --git a/plugins/kolab_files/lib/kolab_files_engine.php b/plugins/kolab_files/lib/kolab_files_engine.php
index f4c78ef..365ca5b 100644
--- a/plugins/kolab_files/lib/kolab_files_engine.php
+++ b/plugins/kolab_files/lib/kolab_files_engine.php
@@ -903,7 +903,7 @@ class kolab_files_engine
// save attachment to file
if ($fp = fopen($path, 'w+')) {
- $message->get_part_content($attach_prop->mime_id, $fp, true);
+ $message->get_part_body($attach_prop->mime_id, false, 0, $fp);
}
else {
$errors[] = true;
diff --git a/plugins/libcalendaring/libcalendaring.php b/plugins/libcalendaring/libcalendaring.php
index 52a8134..6e61add 100644
--- a/plugins/libcalendaring/libcalendaring.php
+++ b/plugins/libcalendaring/libcalendaring.php
@@ -1281,7 +1281,7 @@ class libcalendaring extends rcube_plugin
foreach ($this->ical_parts as $mime_id) {
$part = $this->ical_message->mime_parts[$mime_id];
$charset = $part->ctype_parameters['charset'] ?: RCMAIL_CHARSET;
- $this->mail_ical_parser->import($this->ical_message->get_part_content($mime_id), $charset);
+ $this->mail_ical_parser->import($this->ical_message->get_part_body($mime_id, true), $charset);
// stop on the part that has an iTip method specified
if (count($this->mail_ical_parser->objects) && $this->mail_ical_parser->method) {
diff --git a/plugins/libkolab/lib/kolab_storage_folder.php b/plugins/libkolab/lib/kolab_storage_folder.php
index 2435fa3..59d407f 100644
--- a/plugins/libkolab/lib/kolab_storage_folder.php
+++ b/plugins/libkolab/lib/kolab_storage_folder.php
@@ -444,7 +444,7 @@ class kolab_storage_folder extends kolab_storage_folder_api
// get XML part
foreach ((array)$message->attachments as $part) {
if (!$xml && ($part->mimetype == $content_type || preg_match('!application/([a-z.]+\+)?xml!', $part->mimetype))) {
- $xml = $part->body ? $part->body : $message->get_part_content($part->mime_id);
+ $xml = $message->get_part_body($part->mime_id, true);
}
else if ($part->filename || $part->content_id) {
$key = $part->content_id ? trim($part->content_id, '<>') : $part->filename;
diff --git a/plugins/pdfviewer/pdfviewer.php b/plugins/pdfviewer/pdfviewer.php
index 0b771ea..6f90eb2 100644
--- a/plugins/pdfviewer/pdfviewer.php
+++ b/plugins/pdfviewer/pdfviewer.php
@@ -107,7 +107,7 @@ class pdfviewer extends rcube_plugin
// try to fix invalid application/octet-stream mimetypes for PDF attachments
if ($part->mimetype == 'application/octet-stream' && preg_match('/\.pdf$/', strval($part->filename))) {
- $body = $part->body ? $part->body : $message->get_part_content($part->mime_id, null, true, 2048);
+ $body = $message->get_part_body($part->mime_id, false, 2048);
$real_mimetype = rcube_mime::file_content_type($body, $part->filename, $part->mimetype, true, true);
if (in_array($real_mimetype, $this->pdf_mimetypes)) {
$part->mimetype = $real_mimetype;