From 166b615dbb67d403845b0dc4aed5ed56caf8b6de Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Sat, 14 Jun 2008 14:09:53 -0400
Subject: [PATCH] - Added option to disable displaying of attached images below the message body

---
 program/steps/mail/func.inc |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index af3f6e7..a27023f 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -745,10 +745,14 @@
 
   $ctype_primary = strtolower($MESSAGE->structure->ctype_primary);
   $ctype_secondary = strtolower($MESSAGE->structure->ctype_secondary);
-  
+
   // list images after mail body
-  if (get_boolean($attrib['showimages']) && $ctype_primary == 'multipart' &&
-      !empty($MESSAGE->attachments) && !strstr($message_body, '<html')) {
+  if (get_boolean($attrib['showimages']) 
+	&& $CONFIG['inline_images']
+	&& $ctype_primary == 'multipart'
+        && !empty($MESSAGE->attachments) 
+	&& !strstr($message_body, '<html'))
+    {
     foreach ($MESSAGE->attachments as $attach_prop) {
       if (strpos($attach_prop->mimetype, 'image/') === 0) {
         $out .= html::tag('hr') . html::p(array('align' => "center"),

--
Gitblit v1.9.1