From 41810b2c120f3f988729092b79a5ae93220d5d94 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Wed, 8 Feb 2017 16:54:06 +0100 Subject: [PATCH] Expand image attachments by default If an attachment of type image is smaller than the maximum preview threshold ($g_preview_attachments_inline_max_size), Mantis was only displaying the attachment's name and a [+] button, forcing an extra click for the user to view it. We now display images by default, allowing the user to optionally hide them instead by clicking the [-] button. Fixes #21796 --- core/print_api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/print_api.php b/core/print_api.php index e54db8dddc..1664ec9286 100644 --- a/core/print_api.php +++ b/core/print_api.php @@ -1903,7 +1903,7 @@ function print_bug_attachment( array $p_attachment, $p_security_token ) { if( $t_show_attachment_preview ) { $t_collapse_id = 'attachment_preview_' . $p_attachment['id']; global $g_collapse_cache_token; - $g_collapse_cache_token[$t_collapse_id] = false; + $g_collapse_cache_token[$t_collapse_id] = $p_attachment['type'] == 'image'; collapse_open( $t_collapse_id ); }