]> code.citadel.org Git - citadel.git/commitdiff
Suppress attachment download links for mime parts
authorArt Cancro <ajc@citadel.org>
Mon, 26 Mar 2007 02:45:32 +0000 (02:45 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 26 Mar 2007 02:45:32 +0000 (02:45 +0000)
with zero-length content-type

webcit/messages.c

index 915e208d6ad9f9b3b7c1b220ef3ed39c31ca27ee..d4e3be21c742a81a3b32f85f88d4adb89ed788dd 100644 (file)
@@ -819,9 +819,10 @@ void read_message(long msgnum, int printable_view, char *section) {
                                        "<img src=\"mimepart/%ld/%s/%s\">",
                                        msgnum, mime_partnum, mime_filename);
                        }
-                       else if ( (!strcasecmp(mime_disposition, "attachment")) 
+                       else if ( ( (!strcasecmp(mime_disposition, "attachment")) 
                             || (!strcasecmp(mime_disposition, "inline"))
                             || (!strcasecmp(mime_disposition, ""))
+                            ) && (strlen(mime_content_type) > 0)
                        ) {
                                ++num_attach_links;
                                attach_links = realloc(attach_links,