v5.0-cvs
--------
+[mms] Fix stripping attachments when saving to sent-mail folder when attaching
+ the PGP public key (Bug #4221).
[mms] Removed Special Characters menu.
[mms] Add 'undelete' to Other Actions menu (Bug #7496) (DIMP).
[mms] PGP functions now work in DIMP (Bug #5388).
if (($save_attach == 'never') ||
((strpos($save_attach, 'prompt') === 0) &&
empty($opts['save_attachments']))) {
- foreach (array_keys($this->getAttachments()) as $i) {
- $oldPart = $mime_message->getPart(++$i);
- if ($oldPart !== false) {
- $replace_part = new Horde_Mime_Part();
- $replace_part->setType('text/plain');
- $replace_part->setCharset($charset);
- $replace_part->setContents('[' . _("Attachment stripped: Original attachment type") . ': "' . $oldPart->getType() . '", ' . _("name") . ': "' . $oldPart->getName(true) . '"]', '8bit');
- $mime_message->alterPart($i, $replace_part);
+ $mime_message->buildMimeIds();
+ for ($i = 2; ; ++$i) {
+ if (!($oldPart = $mime_message->getPart($i))) {
+ break;
}
+
+ $replace_part = new Horde_Mime_Part();
+ $replace_part->setType('text/plain');
+ $replace_part->setCharset($charset);
+ $replace_part->setContents('[' . _("Attachment stripped: Original attachment type") . ': "' . $oldPart->getType() . '", ' . _("name") . ': "' . $oldPart->getName(true) . '"]', '8bit');
+ $mime_message->alterPart($i, $replace_part);
}
}