Thanks Andrew. You can post the patches to this list or if you decide to do more work on the RoundCube code it's probably worth to add you as a project member. This would give you access to the CVS repository (once it is accessible again).
Just send me (direct mail) your SourceForge user name if you seriously consider to contribute more code to RoundCube. Diff files are also welcome for sporadic bug fixes.
Regards, Thomas
Andrew Fladmark wrote:
Hello!
I've located (and I believe fixed) an issue with handling and displaying attachments in the latest CVS.
In /program/steps/mail/funct.inc the following lines seem to be incorrect:
// part is file/attachment else if ($mail_part->disposition=='attachment' || $mail_part->disposition=='inline' || $mail_part->headers['content-id'] || (empty($mail_part->disposition) && ($mail_part->d_parameters['filename'] || $mail_part->d_parameters['name'])))
The final check $mail_part->d_parameters['name'] seems that it should actually be replaced with $mail_part->ctype_parameters['name'] based on the final 'else if' of the block which refers to that variable: else if ($mail_part->ctype_parameters['name']).
This was preventing attachments which do not have content-disposition headers from being displayed.
I've been doing some other work to improve attachment handling, but I thought I'd share this one first, since it appears a simple and complete fix... At least for viewing. These type of attachments are not included in forwards either, since the content disposition is not attachment... The following code in /program/steps/mail/compose.inc seems to prevent it:
foreach ($FORWARD_MESSAGE['parts'] as $part) { if ($part->disposition != 'attachment') continue; ..
I have to admit that I'm relatively new to contributing to open source projects, but I'd really like to be able to do so. Can I ask the development community for RoundCube -- what is the most effective way for for me to contribute to resolving issues such as these? Posts like this? Submitting bugs and diffs/patches via SourceForge? Please let me know how best to do this.
I sincerely hope this is of use... I love the RoundCube webmail system and I'd really like to be able to contribute.
Thanks!
Andrew