ws
authorMichael M Slusarz <slusarz@curecanti.org>
Sun, 8 Nov 2009 08:19:17 +0000 (01:19 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 9 Nov 2009 19:30:29 +0000 (12:30 -0700)
imp/lib/UI/Message.php

index a3574a1..48f2724 100644 (file)
@@ -532,13 +532,14 @@ class IMP_UI_Message
                     continue;
                 }
 
-                    while (count($wrap_ids)) {
-                        if (strpos(strval($id), strval(end($wrap_ids))) === 0) {
-                            break;
-                        }
-                        array_pop($wrap_ids);
-                        $msgtext .= '</div>';
+                while (count($wrap_ids)) {
+                    if (strpos(strval($id), strval(end($wrap_ids))) === 0) {
+                        break;
                     }
+                    array_pop($wrap_ids);
+                    $msgtext .= '</div>';
+                }
+
                 if (!empty($info['wrap'])) {
                     $msgtext .= '<div class="' . $info['wrap'] . '">';
                     $wrap_ids[] = $mime_id;