This patch resolves our issue which is identical Ticket #1485152, we
are running PHP 5.1.6, RPM from CentOS 5. Hope it helps.
James
diff -Naur roundcubemail-0.1.1/program/steps/mail/sendmail.inc
roundcube.corrected/program/steps/mail/sendmail.inc
--- roundcubemail-0.1.1/program/steps/mail/sendmail.inc 2008-04-05
08:49:21.000000000 -0400
+++ roundcube.corrected/program/steps/mail/sendmail.inc 2008-07-22
13:56:15.000000000 -0400
@@ -290,8 +290,11 @@
We need to replace mime_content_type in a later release
because the function
is deprecated in favour of File_Info
*/
$fi = finfo_open(FILEINFO_MIME);
$upd_mime = finfo_file($fi, $attachment['path']);
finfo_close($fi);
$MAIL_MIME->addAttachment($attachment['path'],
rc_mime_content_type($attachment['path'],
$attachment['mimetype']),
$upd_mime,
$attachment['name'], true, 'base64',
'attachment', $message_charset);
}
List info: http://lists.roundcube.net/dev/
On Thu, Jul 24, 2008 at 00:35, James MacLachlan james@bluegrass.net wrote:
This patch resolves our issue which is identical Ticket #1485152, we are running PHP 5.1.6, RPM from CentOS 5. Hope it helps.
Actually you're doing the same as in rc_mime_content_type() but only with file_info(). Maybe rc_mime_content_type() should first try file_info() and then mime_content_type(). The latter one is deprecated anyway.
I propose the following patch (untested):
--- program/include/rcube_shared.inc (revision 1607) +++ program/include/rcube_shared.inc (working copy) @@ -556,31 +556,26 @@ */ function rc_mime_content_type($path, $failover = 'unknown/unknown') {
return $finfo;
dl('fileinfo.' . PHP_SHLIB_SUFFIX);
} if (!dl('fileinfo.' . PHP_SHLIB_SUFFIX)) {
return $failover;
if ($finfo = finfo_open(FILEINFO_MIME, $mime_magic)) {
$mime_type = finfo_file($finfo, $path);
finfo_close($finfo);
}
} return $failover;
$mime_type = mime_content_type($path);
} return $failover;
$mime_type = $failover;
}finfo_close($finfo);
return $mime_type;
}
~Thomas _______________________________________________ List info: http://lists.roundcube.net/dev/
On Thu, Jul 24, 2008 at 1:25 PM, Thomas Bruederli roundcube@gmail.com wrote:
On Thu, Jul 24, 2008 at 00:35, James MacLachlan james@bluegrass.net wrote:
This patch resolves our issue which is identical Ticket #1485152, we are running PHP 5.1.6, RPM from CentOS 5. Hope it helps.
Actually you're doing the same as in rc_mime_content_type() but only with file_info(). Maybe rc_mime_content_type() should first try file_info() and then mime_content_type(). The latter one is deprecated anyway.
I propose the following patch (untested):
Looks good (untested). :D
Till _______________________________________________ List info: http://lists.roundcube.net/dev/