Committing more from bug #494216. This doesn't seem to break anything for me,
authorgraf25 <graf25@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 27 May 2002 19:32:42 +0000 (19:32 +0000)
committergraf25 <graf25@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 27 May 2002 19:32:42 +0000 (19:32 +0000)
but then again, I don't see the initial issue.

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2871 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mime.php

index 5f38f709830d1991430aac621394511b851aca13..e5b0e9fcd9d19ffda7ea41e4ebe23ebf877fcee9 100644 (file)
@@ -229,6 +229,21 @@ function mime_get_element (&$structure, $msg, $ent_id) {
            $pos++;
         }
         $structure = substr($structure, strlen($text) + 2);
+     } else if ($char == '{') {
+         /**
+          * loop through until we find the matching quote, 
+          * and return that as a string
+          */
+         $pos = 1;
+         $len = '';
+         while (($char = $structure{$pos}) != '}' 
+                && $pos < strlen($structure)) {
+             $len .= $char;
+             $pos++;
+         }
+         $structure = substr($structure, strlen($len) + 4);
+         $text = substr($structure, 0, $len);
+         $structure = substr($structure, $len + 1);
      } else if ($char == '(') {
         // comment me
         $end = mime_match_parenthesis (0, $structure);