* @param IMP_Contents &$contents An IMP_Contents object.
* @param array $options Additional options:
* <pre>
- * 'downloadall' - (array) Use the algorithm in
- * IMP_Contents::getDownloadAllList() to determine the
- * list of attachments?
* 'notify' - (boolean) Add notification message on errors?
* 'skip' - (array) Skip these MIME IDs.
* </pre>
public function attachFilesFromMessage(&$contents, $options = array())
{
$mime_message = $contents->getMIMEMessage();
- $dl_list = empty($options['downloadall'])
- ? array_slice(array_keys($mime_message->contentTypeMap()), 1)
- : $contents->getDownloadAllList();
+ $dl_list = array_slice(array_keys($mime_message->contentTypeMap()), 1);
if (!empty($options['skip'])) {
$dl_list = array_diff($dl_list, $options['skip']);
}
/* Loop through all to-be-stripped mime parts. */
if (is_null($partid)) {
- $partids = $contents->getDownloadAllList();
+ // TODO
+ $partids = array_slice(array_keys($message->contentTypeMap()), 1);
} else {
/* Sanity checking: make sure part does not live under a
* message/rfc822 part. */
$fwd_msg['headers']['subject'] = $subject_header;
}
} elseif ($type == 'forward_attachments') {
- $imp_compose->attachFilesFromMessage($imp_contents, array('downloadall' => true, 'notify' => true));
+ $imp_compose->attachFilesFromMessage($imp_contents, array('notify' => true));
}
return $fwd_msg;