From d00d1cdccdc23dea47524de08f11f9debfb69d76 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 24 Apr 2015 02:48:57 -0600 Subject: [PATCH] Revert iteration changes This broke parsing embedded parts. Revert "Keep the typos coming" This reverts commit 39c27c43748956a0d2c0d081979986707fd53d05. Revert "Fix typo" This reverts commit 6a2f78aae53f2c4e689a0f1310025ae71da0b3bc. Revert "Fix iteration through certain MIME parts with deeply embedded subparts" This reverts commit cd41ccc0e69efc8b3ae943fc471ffb39e762aa00. This has been tracked down to a very obscure issue in the new MIME part iteration code. --- imp/lib/Contents/Message.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/imp/lib/Contents/Message.php b/imp/lib/Contents/Message.php index d2494749775..1263b212750 100644 --- a/imp/lib/Contents/Message.php +++ b/imp/lib/Contents/Message.php @@ -561,16 +561,10 @@ protected function _getInlineOutput(array $options) : null; $show_parts = $prefs->getValue('parts_display'); - /* Need to iterate through entire part list first, since render - * methods may break iteration when they iterate through subparts. */ - $p_list = array(); - foreach ($this->contents->getMIMEMessage()->partIterator() as $val) { - $mime_id = $val->getMimeId(); + foreach ($this->contents->getMIMEMessage()->partIterator() as $part) { + $mime_id = $part->getMimeId(); $i[] = $mime_id; - $p_list[$mime_id] = $val; - } - foreach ($p_list as $mime_id => $part) { if (isset($display_ids[$mime_id]) || isset($atc_parts[$mime_id])) { continue;