소스 검색

Committing more from bug #494216. This doesn't seem to break anything for me,
but then again, I don't see the initial issue.

graf25 23 년 전
부모
커밋
8d5e1d21e3
1개의 변경된 파일15개의 추가작업 그리고 0개의 파일을 삭제
  1. 15 0
      functions/mime.php

+ 15 - 0
functions/mime.php

@@ -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);