Plugin API: Call message_part_structure hook for sub-parts of multipart/alternative message (#5678)

pull/5690/head
Aleksander Machniak 8 years ago
parent 51dbc2e438
commit fa32c2c471

@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
- Plugin API: Call message_part_structure hook for sub-parts of multipart/alternative message (#5678)
- Enigma: Always use detached signatures (#5624)
- Enigma: Fix handling of messages with nested PGP encrypted parts (#5634)
- Minimize unwanted message loading in preview frame on drag (#5616)

@ -679,9 +679,10 @@ class rcube_message
$this->parse_alternative = false;
// if plain part was found, we should unset it if html is preferred
if ($this->opt['prefer_html'] && count($this->parts))
if ($this->opt['prefer_html'] && count($this->parts)) {
$plain_part = null;
}
}
// choose html/plain part to print
if ($html_part !== null && $this->opt['prefer_html']) {
@ -697,8 +698,16 @@ class rcube_message
// add the right message body
if (is_object($print_part)) {
$print_part->type = 'content';
// Allow plugins to handle also this part
$plugin = $this->app->plugins->exec_hook('message_part_structure',
array('object' => $this, 'structure' => $print_part,
'mimetype' => $print_part->mimetype, 'recursive' => true));
if (!$plugin['abort']) {
$this->add_part($print_part);
}
}
// show plaintext warning
else if ($html_part !== null && empty($this->parts)) {
$c = new stdClass;

Loading…
Cancel
Save