mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Fixed 'preview attachments' with images
SVN revision: 2109
This commit is contained in:
parent
f4c05c79c9
commit
635e62b3bd
@ -10995,14 +10995,15 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
display_inline = 0;
|
display_inline = 0;
|
||||||
if ((chkext(file_name, ".htm") || chkext(file_name, ".html")) && is_full_html(file_name))
|
if ((chkext(file_name, ".htm") || chkext(file_name, ".html")) && is_full_html(file_name))
|
||||||
display_inline = 0;
|
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);
|
thumb_status = create_thumbnail(lbs, file_name);
|
||||||
if (thumb_status)
|
if (thumb_status)
|
||||||
display_inline = 1;
|
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);
|
get_thumb_name(file_name, thumb_name, sizeof(thumb_name), 0);
|
||||||
if (strrchr(thumb_name, DIR_SEPARATOR))
|
if (strrchr(thumb_name, DIR_SEPARATOR))
|
||||||
strlcpy(str, strrchr(thumb_name, DIR_SEPARATOR) + 1, sizeof(str));
|
strlcpy(str, strrchr(thumb_name, DIR_SEPARATOR) + 1, sizeof(str));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user