Fix message highlighting again
[squirrelmail.git] / src / read_body.php
index 4197319073ce8585797b5bf9f4c2a6da5cf8dda8..a814cd6ca2c94e72450b73177af31d5eab3d08b1 100644 (file)
@@ -12,6 +12,9 @@
  * @package squirrelmail
  */
 
+/** This is the read_body page */
+define('PAGE_NAME', 'read_body');
+
 /**
  * Include the SquirrelMail initialization file.
  */
@@ -125,8 +128,7 @@ function ServerMDNSupport($aFlags) {
 }
 
 function SendMDN ( $mailbox, $passed_id, $message, $imapConnection) {
-    global $username, $attachment_dir, $color,
-           $squirrelmail_language, $default_charset,
+    global $squirrelmail_language, $default_charset,
            $languages, $useSendmail, $domain, $sent_folder;
 
     sqgetGlobalVar('SERVER_NAME', $SERVER_NAME, SQ_SERVER);
@@ -143,7 +145,7 @@ function SendMDN ( $mailbox, $passed_id, $message, $imapConnection) {
     }
     $rfc822_header->content_type = $content_type;
     $rfc822_header->to[] = $header->dnt;
-    $rfc822_header->subject = _("Read:") . ' ' . encodeHeader($header->subject);
+    $rfc822_header->subject = _("Read:") . ' ' . decodeHeader($header->subject,true,false);
 
     $idents = get_identities();
     $needles = array();
@@ -271,7 +273,7 @@ function SendMDN ( $mailbox, $passed_id, $message, $imapConnection) {
                 _("Server replied:") . ' ' . $deliver->dlv_ret_nr . ' ' .
                 nl2br(htmlspecialchars($deliver->dlv_server_msg));
         }
-        plain_error_message($msg, $color);
+        plain_error_message($msg);
     } else {
         unset ($deliver);
         if (sqimap_mailbox_exists ($imapConnection, $sent_folder)) {
@@ -294,7 +296,7 @@ function ToggleMDNflag ($set ,$imapConnection, $mailbox, $passed_id) {
 }
 
 function formatRecipientString($recipients, $item ) {
-    global $show_more_cc, $show_more, $show_more_bcc,
+    global $show_more, $show_more_cc, $show_more_bcc,
            $PHP_SELF, $oTemplate;
 
     $string = '';
@@ -447,8 +449,6 @@ function formatMenubar($aMailbox, $passed_id, $passed_ent_id, $message, $removed
 
     $urlMailbox = urlencode($mailbox);
 
-    $msgs_url = $base_uri . 'src/';
-
     // Create Prev & Next links
     // Handle nested entities first (i.e. Mime Attach parts)
     $prev_href = $next_href = $up_href = $del_href = $del_prev_href = $del_next_href = '';
@@ -787,7 +787,6 @@ if(sqgetGlobalVar('view_unsafe_images', $temp)) {
 sqgetGlobalVar('mailbox_cache',$mailbox_cache,SQ_SESSION);
 
 /* end of get globals */
-global $sqimap_capabilities, $lastTargetMailbox;
 
 $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0);
 $aMailbox = sqm_api_mailbox_select($imapConnection, $iAccount, $mailbox,array('setindex' => $what, 'offset' => $startMessage),array());
@@ -982,4 +981,3 @@ formatMenuBar($aMailbox, $passed_id, $passed_ent_id, $message, false, FALSE);
 do_hook('read_body_bottom', $null);
 sqimap_logout($imapConnection);
 $oTemplate->display('footer.tpl');
-?>