Remove HTML from core (please test)
[squirrelmail.git] / src / read_body.php
index b78a904fcf39ad487bf3b3cce309c1ac9a770c85..378f43c3a7d1c1732a25e8bb33911f21feb9560b 100644 (file)
@@ -307,7 +307,7 @@ function SendMDN ( $mailbox, $passed_id, $message, $imapConnection) {
             }
             require_once(SM_PATH . 'class/deliver/Deliver_IMAP.class.php');
             $imap_deliver = new Deliver_IMAP();
-            $imap_deliver->mail($composeMessage, $imapConnection, 0, 0, $sent_folder);
+            $imap_deliver->mail($composeMessage, $imapConnection, 0, 0, $imapConnection, $sent_folder);
             unset ($imap_deliver);
         }
     }
@@ -688,22 +688,25 @@ function formatToolbar($mailbox, $passed_id, $passed_ent_id, $message, $color) {
     }
     $url = $base_uri.'src/view_header.php?'.$query_string;
 
-    if ( checkForJavaScript() ) { 
-        $pf_params = 'javascript:printThis();';
-    } else {
-        $pf_params = set_url_var($PHP_SELF, 'print', '1');
-    }
-
     $links = array();
     $links[] = array (
                         'URL'   => $url,
                         'Text'  => _("View Full Header")
                      );
-    $links[] = array (
-                        'URL'   => $pf_params,
+
+    if ( checkForJavaScript() ) { 
+        $links[] = array (
+                        'URL'   => 'javascript:printThis();',
+                        'Text'  => _("Print"),
+                     );
+    } else {
+        $links[] = array (
+                        'URL'   => set_url_var($PHP_SELF, 'print', '1'),
                         'Text'  => _("Print"),
                         'Target' => '_blank'
                      );
+    }
+
     $links[] = array (
                         'URL'   => $download_href,
                         'Text'  => _("Download this as a file")
@@ -947,6 +950,8 @@ if (isset($sendreceipt)) {
 /* End of block for handling incoming url vars */
 /***********************************************/
 
+$oTemplate->assign('aAttribs', array('class' => 'entity_sep'));
+$hr = $oTemplate->fetch('horizontal_rule.tpl');
 $messagebody = '';
 do_hook('read_body_top', $null);
 if ($show_html_default == 1) {
@@ -958,7 +963,7 @@ $cnt = count($ent_ar);
 for ($i = 0; $i < $cnt; $i++) {
    $messagebody .= formatBody($imapConnection, $message, $color, $wrap_at, $ent_ar[$i], $passed_id, $mailbox);
    if ($i != $cnt-1) {
-       $messagebody .= '<hr />';
+       $messagebody .= $hr;
    }
 }