summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/mail/func.inc4
-rw-r--r--program/steps/mail/get.inc2
-rw-r--r--program/steps/mail/show.inc2
3 files changed, 3 insertions, 5 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index b9971ce0c..7270cf95a 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -1343,12 +1343,10 @@ function rcmail_message_body($attrib)
function rcmail_part_image_type($part)
{
- $rcmail = rcmail::get_instance();
-
// Skip TIFF images if browser doesn't support this format...
$tiff_support = !empty($_SESSION['browser_caps']) && !empty($_SESSION['browser_caps']['tif']);
// until we can convert them to JPEG
- $tiff_support = $tiff_support || $rcmail->config->get('im_convert_path');
+ $tiff_support = $tiff_support || rcube_image::is_convertable('image/tiff');
// Content-type regexp
$mime_regex = $tiff_support ? '/^image\//i' : '/^image\/(?!tif)/i';
diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc
index c6262097f..02d57c7dc 100644
--- a/program/steps/mail/get.inc
+++ b/program/steps/mail/get.inc
@@ -221,7 +221,7 @@ else if (strlen($part_id)) {
// TIFF to JPEG conversion, if needed
$tiff_support = !empty($_SESSION['browser_caps']) && !empty($_SESSION['browser_caps']['tif']);
if (!empty($_REQUEST['_embed']) && !$tiff_support
- && $RCMAIL->config->get('im_convert_path')
+ && rcube_image::is_convertable('image/tiff')
&& rcmail_part_image_type($part) == 'image/tiff'
) {
$tiff2jpeg = true;
diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc
index 9498d1dc5..beb2cc6e9 100644
--- a/program/steps/mail/show.inc
+++ b/program/steps/mail/show.inc
@@ -102,7 +102,7 @@ if ($uid) {
}
if (empty($_SESSION['browser_caps']['tif']) && ($key = array_search('image/tiff', $mimetypes)) !== false) {
// we can convert tiff to jpeg
- if (!$RCMAIL->config->get('im_convert_path')) {
+ if (!rcube_image::is_convertable('image/tiff')) {
unset($mimetypes[$key]);
}
}