[Patch] for Mail_mimeDecode
| From: | Heino H. Gehlsen | Date: | Sun, 27 Jul 2003 12:17:38 +0000 |
| Subject: | [Patch] for Mail_mimeDecode | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-18784@lists.php.net to get a copy of this message | ||
In the need of a uudecode function, that both extracted and removed
uuencoded sections from a string, I made some improvements to the existing
uudecode() in Mail_mimeDecode.
The patched uudecode() lets the user choose between preserving all uuencoded
sections, removing only successfully extracted sections, and removing all
uuencoded blockes. Additionaly the user can provide a replacement string,
that will replace the removed sections.
While at it, I saw that the $_input is actually only used within
Mail_mimeDecode(), and that there also is some unnessesary variable
duplication, so I also made a second patch, which takes care of this. The
patch also makes a minor change in _decode(), where 'text/plain' and
'text/html' had separate but identical code.
Heino