diff options
| author | roundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2005-09-30 19:38:27 +0000 |
|---|---|---|
| committer | roundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2005-09-30 19:38:27 +0000 |
| commit | 3e0b457ce893a6a309b573a270336fb3ef4edac7 (patch) | |
| tree | f9b33712612224a397b5c484e7795065c5ce21a9 /roundcubemail/program/lib/Mail/mimeDecode.php | |
| parent | 1da45b933e35f90a6c84ca652a4eb2e78f946916 (diff) | |
Moved config files to config/*inc.php.dist
git-svn-id: https://svn.roundcube.net/trunk@10 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/lib/Mail/mimeDecode.php')
| -rw-r--r-- | roundcubemail/program/lib/Mail/mimeDecode.php | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/roundcubemail/program/lib/Mail/mimeDecode.php b/roundcubemail/program/lib/Mail/mimeDecode.php index 5bcf4fb31..07fe88f6e 100644 --- a/roundcubemail/program/lib/Mail/mimeDecode.php +++ b/roundcubemail/program/lib/Mail/mimeDecode.php @@ -3,7 +3,7 @@ // +-----------------------------------------------------------------------+ // | Copyright (c) 2002-2003 Richard Heyes | // | Copyright (c) 2003-2005 The PHP Group | -// | Licensed under the GNU GPL | +// | All rights reserved. | // | | // | Redistribution and use in source and binary forms, with or without | // | modification, are permitted provided that the following conditions | @@ -294,8 +294,9 @@ class Mail_mimeDecode extends PEAR $this->_error = 'No boundary found for ' . $content_type['value'] . ' part'; return false; } - + $default_ctype = (strtolower($content_type['value']) === 'multipart/digest') ? 'message/rfc822' : 'text/plain'; + $parts = $this->_boundarySplit($body, $content_type['other']['boundary']); for ($i = 0; $i < count($parts); $i++) { list($part_header, $part_body) = $this->_splitBodyHeader($parts[$i]); @@ -498,14 +499,8 @@ class Mail_mimeDecode extends PEAR } $tmp = explode('--' . $boundary, $input); - $count = count($tmp); - // when boundaries are set correctly we should have at least 3 parts; - // if not, return the last one (tbr) - if ($count<3) - return array($tmp[$count-1]); - - for ($i = 1; $i < $count - 1; $i++) { + for ($i = 1; $i < count($tmp) - 1; $i++) { $parts[] = $tmp[$i]; } |
