From 635e62b3bd41dfc8bd796d18d4efa7a634ce9e02 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Mon, 2 Jun 2008 10:07:32 +0000 Subject: [PATCH] Fixed 'preview attachments' with images SVN revision: 2109 --- src/elogd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/elogd.c b/src/elogd.c index da36c6a7..1c8a1a27 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -10995,14 +10995,15 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL display_inline = 0; if ((chkext(file_name, ".htm") || chkext(file_name, ".html")) && is_full_html(file_name)) display_inline = 0; - if (getcfg(lbs->name, "Preview attachments", str, sizeof(str)) && atoi(str) == 0) - display_inline = 0; thumb_status = create_thumbnail(lbs, file_name); if (thumb_status) display_inline = 1; - if (thumb_status) { + if (getcfg(lbs->name, "Preview attachments", str, sizeof(str)) && atoi(str) == 0) + display_inline = 0; + + if (thumb_status && display_inline) { get_thumb_name(file_name, thumb_name, sizeof(thumb_name), 0); if (strrchr(thumb_name, DIR_SEPARATOR)) strlcpy(str, strrchr(thumb_name, DIR_SEPARATOR) + 1, sizeof(str));