Aleksander Machniak
2013-03-14 574928200fd8da1194af9a9a1e741c77d7a50185
Use $mime_parts not $parts in has_*_part() methods so detection is
correct no matter if prefer_html is enabled or not.
1 files modified
4 ■■■■ changed files
program/lib/Roundcube/rcube_message.php 4 ●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_message.php
@@ -206,7 +206,7 @@
    function has_html_part($enriched = false)
    {
        // check all message parts
        foreach ($this->parts as $part) {
        foreach ($this->mime_parts as $part) {
            if ($part->mimetype == 'text/html' || ($enriched && $part->mimetype == 'text/enriched')) {
                // Skip if part is an attachment
                if ($this->is_attachment($part)) {
@@ -246,7 +246,7 @@
    function has_text_part()
    {
        // check all message parts
        foreach ($this->parts as $part) {
        foreach ($this->mime_parts as $part) {
            if ($part->mimetype == 'text/plain') {
                // Skip if part is an attachment
                if ($this->is_attachment($part)) {