summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-10-28 09:06:29 +0100
committerAleksander Machniak <alec@alec.pl>2014-10-28 09:06:29 +0100
commit68c41f1dff4ec94ffa78ef772cd1bcd3f8d2d9a0 (patch)
treea6179bd04dabc095d092cbaf787d6ce1bd8905ab /program/lib/Roundcube
parent421ed1e5458ef8b3947ca4cce45eae7804b41f74 (diff)
Fix regresion that caused double charset conversion in some messages (#1490121)
Diffstat (limited to 'program/lib/Roundcube')
-rw-r--r--program/lib/Roundcube/rcube_message.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php
index 0d33ba411..d089713e5 100644
--- a/program/lib/Roundcube/rcube_message.php
+++ b/program/lib/Roundcube/rcube_message.php
@@ -263,17 +263,18 @@ class rcube_message
$this->storage->set_folder($this->folder);
$body = $this->storage->get_message_part($this->uid, $mime_id, $part,
- $mode === -1, is_resource($mode) ? $mode : null, !$formatted, $max_bytes, $formatted);
-
- if (!$mode && $body && $formatted) {
- $body = self::format_part_body($body, $part, $this->headers->charset);
- }
+ $mode === -1, is_resource($mode) ? $mode : null,
+ !($mode && $formatted), $max_bytes, $mode && $formatted);
if (is_resource($mode)) {
rewind($mode);
return $body !== false;
}
+ if (!$mode && $body && $formatted) {
+ $body = self::format_part_body($body, $part, $this->headers->charset);
+ }
+
return $body;
}