From 574928200fd8da1194af9a9a1e741c77d7a50185 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Thu, 14 Mar 2013 08:20:28 -0400
Subject: [PATCH] Use $mime_parts not $parts in has_*_part() methods so detection is correct no matter if prefer_html is enabled or not.
---
program/lib/Roundcube/rcube_message.php | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php
index 7d58a8e..1e3d143 100644
--- a/program/lib/Roundcube/rcube_message.php
+++ b/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)) {
--
Gitblit v1.9.1