Hi,
So, I've been modifying the cmd_learn driver in markasjunk2 to also
restore messages to their original content and save them in the user's
inbox, the way that the sa_detach driver does.
It was seeing rcube_message->attachments as a zero-length array even on
messages with the paperclip icon; I traced this back to roughly line 432
of rcube_message.php ($Id: rcube_message.php 5261 2011-09-21 12:22:40Z
alec $):
// list as attachment as well
if (!empty($mail_part->filename))
$this->attachments[] = $mail_part;
If the message part is a text/plain type (which it shouldn't be, but it
is, and I'll fix that too in a bit, $%&#! spamassassin), and the message
part does not have a filename, then it doesn't get added to the
attachments array.
So there are two ways for me to fix this: I can either have the
cmd_learn driver code first check rcube_message->attachments, and if
that's a zero-length array, then also check rcube_message->parts, or I
can eliminate the filename check from this part of rcube_message.php.
Which approach is more correct? Or is there another way to do this?
Thanks,
- R.
--
[__ Robert Sheldon
[__ Founder, No Problem
[__ Information technology support and services
[__ (530) 575-0278
[__ "You must be the change you wish to see in the world." -- Mahatma
Gandhi
_______________________________________________
List info: http://lists.roundcube.net/dev/
BT/8f4f07cd