Don't send data if it is empty
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 30 Jul 2009 19:09:19 +0000 (13:09 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 30 Jul 2009 20:13:22 +0000 (14:13 -0600)
imp/lib/Views/ShowMessage.php

index 7870a91..8cc0357 100644 (file)
@@ -307,9 +307,9 @@ class IMP_Views_ShowMessage
             $result['atc_label'] = ($show_parts == 'all')
                 ? _("Parts")
                 : sprintf(ngettext("%d Attachment", "%d Attachments", count($atc_parts)), count($atc_parts));
-            $result['atc_download'] = (count($display_ids) > 2)
-                ? Horde::link($imp_contents->urlView($imp_contents->getMIMEMessage(), 'download_all')) . '[' . _("Save All") . ']</a>'
-                : '';
+            if (count($display_ids) > 2) {
+                $result['atc_download'] = Horde::link($imp_contents->urlView($imp_contents->getMIMEMessage(), 'download_all')) . '[' . _("Save All") . ']</a>';
+            }
         }
 
         /* Show attachment information in headers? */