summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-03-05 10:25:12 +0100
committerAleksander Machniak <alec@alec.pl>2013-03-05 10:26:29 +0100
commitdedf13879560006118864abd807e6165d7b62b3a (patch)
tree4c4c554bedb628f528f159fee044bed460d85e97 /program/steps
parent7797005999e7026225cb775db02965b2608ccfb7 (diff)
Fix thumbnail size when GD extension is used for image resize (#1488985)
Conflicts: CHANGELOG
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/mail/get.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc
index 54d1a4e77..23dc22b7c 100644
--- a/program/steps/mail/get.inc
+++ b/program/steps/mail/get.inc
@@ -60,11 +60,11 @@ else if ($_GET['_thumb']) {
$pid = get_input_value('_part', RCUBE_INPUT_GET);
if ($part = $MESSAGE->mime_parts[$pid]) {
$thumbnail_size = $RCMAIL->config->get('image_thumbnail_size', 240);
- $temp_dir = $RCMAIL->config->get('temp_dir');
- list(,$ext) = explode('/', $part->mimetype);
+ $temp_dir = $RCMAIL->config->get('temp_dir');
+ list(,$ext) = explode('/', $part->mimetype);
$cache_basename = $temp_dir . '/' . md5($MESSAGE->headers->messageID . $part->mime_id . ':' . $RCMAIL->user->ID . ':' . $thumbnail_size);
- $cache_file = $cache_basename . '.' . $ext;
- $mimetype = $part->mimetype;
+ $cache_file = $cache_basename . '.' . $ext;
+ $mimetype = $part->mimetype;
// render thumbnail image if not done yet
if (!is_file($cache_file)) {
@@ -73,7 +73,7 @@ else if ($_GET['_thumb']) {
fclose($fp);
$image = new rcube_image($orig_name);
- if ($imgtype = $image->resize($RCMAIL->config->get('image_thumbnail_size', 240), $cache_file, true)) {
+ if ($imgtype = $image->resize($thumbnail_size, $cache_file, true)) {
$mimetype = 'image/' . $imgtype;
unlink($orig_name);
}