Changeset 7673 for trunk/library/mime
- Timestamp:
- 12/18/12 16:15:29 (11 years ago)
- Location:
- trunk/library/mime
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/library/mime/mime.php
r7655 r7673 895 895 case !$text && !$html && $attachments: 896 896 $message =& $this->_addMixedPart(); 897 for ($i = 0; $i < count($this->_parts); ++$i) { 897 $parts_count = count($this->_parts); 898 for ($i = 0; $i < $parts_count; ++$i) { 898 899 $this->_addAttachmentPart($message, $this->_parts[$i]); 899 900 } … … 903 904 $message =& $this->_addMixedPart(); 904 905 $this->_addTextPart($message, $this->_txtbody); 905 for ($i = 0; $i < count($this->_parts); ++$i) { 906 $parts_count = count($this->_parts); 907 for ($i = 0; $i < $parts_count; ++$i) { 906 908 $this->_addAttachmentPart($message, $this->_parts[$i]); 907 909 } … … 930 932 $ht =& $this->_addRelatedPart($message); 931 933 $this->_addHtmlPart($ht); 932 for ($i = 0; $i < count($this->_html_images); ++$i) { 934 $html_images_count = count($this->_html_images); 935 for ($i = 0; $i < $html_images_count; ++$i) { 933 936 $this->_addHtmlImagePart($ht, $this->_html_images[$i]); 934 937 } … … 939 942 $message =& $this->_addRelatedPart($null); 940 943 $this->_addHtmlPart($message); 941 for ($i = 0; $i < count($this->_html_images); ++$i) { 944 $html_images_count = count($this->_html_images); 945 for ($i = 0; $i < $html_images_count; ++$i) { 942 946 $this->_addHtmlImagePart($message, $this->_html_images[$i]); 943 947 } … … 958 962 $this->_addHtmlPart($message); 959 963 } 960 for ($i = 0; $i < count($this->_html_images); ++$i) { 964 $html_images_count = count($this->_html_images); 965 for ($i = 0; $i < $html_images_count; ++$i) { 961 966 $this->_addHtmlImagePart($message, $this->_html_images[$i]); 962 967 } … … 973 978 $this->_addHtmlPart($message); 974 979 } 975 for ($i = 0; $i < count($this->_parts); ++$i) { 980 $parts_count = count($this->_parts); 981 for ($i = 0; $i < $parts_count; ++$i) { 976 982 $this->_addAttachmentPart($message, $this->_parts[$i]); 977 983 } … … 989 995 } 990 996 $this->_addHtmlPart($rel); 991 for ($i = 0; $i < count($this->_html_images); ++$i) { 997 $html_images_count = count($this->_html_images); 998 for ($i = 0; $i < $html_images_count; ++$i) { 992 999 $this->_addHtmlImagePart($rel, $this->_html_images[$i]); 993 1000 } 994 for ($i = 0; $i < count($this->_parts); ++$i) { 1001 $parts_count = count($this->_parts); 1002 for ($i = 0; $i < $parts_count; ++$i) { 995 1003 $this->_addAttachmentPart($message, $this->_parts[$i]); 996 1004 } … … 1008 1016 $this->_addHtmlPart($message); 1009 1017 } 1010 1011 for ($i = 0; $i < count($this->_html_images); ++$i) { 1018 1019 $html_images_count = count($this->_html_images); 1020 for ($i = 0; $i < $html_images_count; ++$i) { 1012 1021 $this->_addHtmlImagePart($message, $this->_html_images[$i]); 1013 1022 } 1014 for ($i = 0; $i < count($this->_parts); ++$i) { 1023 $parts_count = count($this->_parts); 1024 for ($i = 0; $i < $parts_count; ++$i) { 1015 1025 $this->_addAttachmentPart($message, $this->_parts[$i]); 1016 1026 } -
trunk/library/mime/mimeDecode.php
r7655 r7673 326 326 327 327 $parts = $this->_boundarySplit($body, $content_type['other']['boundary']); 328 for ($i = 0; $i < count($parts); ++$i) { 328 $parts_count = count($parts); 329 for ($i = 0; $i < $parts_count; ++$i) { 329 330 list($part_header, $part_body) = $this->_splitBodyHeader($parts[$i]); 330 331 $part = $this->_decode($part_header, $part_body, $default_ctype); … … 386 387 $return[$prepend . $mime_number] = &$structure; 387 388 } 388 for ($i = 0; $i < count($structure->parts); ++$i) {389 389 $structure_parts_count = count($structure->parts); 390 for ($i = 0; $i < $structure_parts_count; ++$i) { 390 391 391 392 if (!empty($structure->headers['content-type']) AND substr(strtolower($structure->headers['content-type']), 0, 8) == 'message/') { … … 792 793 preg_match_all("/begin ([0-7]{3}) (.+)\r?\n(.+)\r?\nend/Us", $input, $matches); 793 794 794 for ($j = 0; $j < count($matches[3]); ++$j) { 795 $matches_count = count($matches[3]); 796 for ($j = 0; $j < $matches_count; ++$j) { 795 797 796 798 $str = $matches[3][$j]; … … 943 945 // Multiple headers with this name 944 946 if (is_array($headers[$hdr_name])) { 945 for ($i = 0; $i < count($hdr_value); ++$i) { 947 $hdr_value_count = count($hdr_value); 948 for ($i = 0; $i < $hdr_value_count; ++$i) { 946 949 $output .= Mail_mimeDecode::_getXML_helper($hdr_name, $hdr_value[$i], $indent); 947 950 } … … 954 957 955 958 if (!empty($input->parts)) { 956 for ($i = 0; $i < count($input->parts); ++$i) { 959 $parts_count = count($input->parts); 960 for ($i = 0; $i < $parts_count; ++$i) { 957 961 $output .= $crlf . str_repeat($htab, $indent) . '<mimepart>' . $crlf . 958 962 Mail_mimeDecode::_getXML($input->parts[$i], $indent+1) . -
trunk/library/mime/mimePart.php
r7655 r7673 283 283 $encoded['body'] = ''; 284 284 285 for ($i = 0; $i < count($this->_subparts); ++$i) { 285 $subparts_count = count($this->_subparts); 286 for ($i = 0; $i < $subparts_count; ++$i) { 286 287 $encoded['body'] .= '--' . $boundary . $eol; 287 288 $tmp = $this->_subparts[$i]->encode(); … … 393 394 394 395 if (count($this->_subparts)) { 395 for ($i = 0; $i < count($this->_subparts); ++$i) { 396 $subparts_count = count($this->_subparts); 397 for ($i = 0; $i < $subparts_count; ++$i) { 396 398 fwrite($fh, $f_eol . '--' . $boundary . $eol); 397 399 $res = $this->_subparts[$i]->_encodePartToFile($fh);
Note: See TracChangeset
for help on using the changeset viewer.