XHTML fixes
[squirrelmail.git] / src / compose.php
index a07c3872aed98acbfb04a3223f6c4501305d57d5..f6f9f548e404a31099b164706d4ba13c179b973a 100644 (file)
@@ -118,7 +118,6 @@ function replyAllString($header) {
     /**
      * 1) Remove the addresses we'll be sending the message 'to'
      */
-    $url_replytoall_avoid_addrs = '';
     if (isset($header->replyto)) {
         $excl_ar = $header->getAddr_a('replyto');
     }
@@ -324,17 +323,17 @@ if ($draft) {
         /* If this is a resumed draft, then delete the original */
         if(isset($delete_draft)) {
             Header("Location: $location/delete_message.php?mailbox=" . urlencode($draft_folder) .
-                    "&message=$delete_draft&startMessage=1&saved_draft=yes");
+                    "&message=$delete_draft&startMessage=1&saved_draft=yes");
             exit();
         }
         else {
             if ($compose_new_win == '1') {
-                Header("Location: $location/compose.php?saved_draft=yes&session=$composesession");
+                Header("Location: $location/compose.php?saved_draft=yes&session=$composesession");
                 exit();
             }
             else {
                 Header("Location: $location/right_main.php?mailbox=" . urlencode($draft_folder) .
-                        "&startMessage=1&note=".urlencode($draft_message));
+                        "&startMessage=1&note=".urlencode($draft_message));
                 exit();
             }
         }
@@ -398,7 +397,7 @@ if ($send) {
         unset($compose_messages[$session]);
         if ( isset($delete_draft)) {
             Header("Location: $location/delete_message.php?mailbox=" . urlencode( $draft_folder ).
-                    "&message=$delete_draft&startMessage=1&mail_sent=yes");
+                    "&message=$delete_draft&startMessage=1&mail_sent=yes");
             exit();
         }
         if ($compose_new_win == '1') {
@@ -407,7 +406,7 @@ if ($send) {
         }
         else {
             Header("Location: $location/right_main.php?mailbox=$urlMailbox".
-                    "&startMessage=$startMessage&mail_sent=yes");
+                    "&startMessage=$startMessage&mail_sent=yes");
         }
     } else {
         if ($compose_new_win == '1') {
@@ -574,7 +573,7 @@ function getforwardSubject($subject)
 /* This function is used when not sending or adding attachments */
 function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $session='') {
     global $editor_size, $default_use_priority, $body, $idents,
-        $use_signature, $composesession, $data_dir, $username,
+        $use_signature, $data_dir, $username,
         $username, $key, $imapServerAddress, $imapPort, $compose_messages,
         $composeMessage, $body_quote;
     global $languages, $squirrelmail_language, $default_charset;
@@ -623,7 +622,6 @@ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $se
             $orig_header = $message->rfc822_header;
         }
 
-        $encoding = $message->header->encoding;
         $type0 = $message->type0;
         $type1 = $message->type1;
         foreach ($entities as $ent) {
@@ -824,7 +822,7 @@ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $se
 } /* function newMail() */
 
 function getAttachments($message, &$composeMessage, $passed_id, $entities, $imapConnection) {
-    global $attachment_dir, $username, $data_dir, $squirrelmail_language;
+    global $attachment_dir, $username, $data_dir, $squirrelmail_language, $languages;
     $hashed_attachment_dir = getHashedDir($username, $attachment_dir);
     if (!count($message->entities) ||
             ($message->type0 == 'message' && $message->type1 == 'rfc822')) {
@@ -881,7 +879,7 @@ function getAttachments($message, &$composeMessage, $passed_id, $entities, $imap
 
 function getMessage_RFC822_Attachment($message, $composeMessage, $passed_id,
         $passed_ent_id='', $imapConnection) {
-    global $attachments, $attachment_dir, $username, $data_dir;
+    global $attachment_dir, $username, $data_dir;
     $hashed_attachment_dir = getHashedDir($username, $attachment_dir);
     if (!$passed_ent_id) {
         $body_a = sqimap_run_command($imapConnection,
@@ -913,14 +911,13 @@ function getMessage_RFC822_Attachment($message, $composeMessage, $passed_id,
 }
 
 function showInputForm ($session, $values=false) {
-    global $send_to, $send_to_cc, $body, $startMessage,
-        $passed_body, $color, $use_signature, $signature, $prefix_sig,
-        $editor_size, $editor_height, $attachments, $subject, $newmail,
+    global $send_to, $send_to_cc, $body, $startMessage, $action,
+        $color, $use_signature, $signature, $prefix_sig,
+        $editor_size, $editor_height, $subject, $newmail,
         $use_javascript_addr_book, $send_to_bcc, $passed_id, $mailbox,
         $from_htmladdr_search, $location_of_buttons, $attachment_dir,
-        $username, $data_dir, $identity, $idents, $draft_id, $delete_draft,
-        $mailprio, $default_use_mdn, $mdn_user_support, $compose_new_win,
-        $saved_draft, $mail_sent, $sig_first, $edit_as_new, $action,
+        $username, $data_dir, $identity, $idents, $delete_draft,
+        $mailprio, $compose_new_win, $saved_draft, $mail_sent, $sig_first,
         $username, $compose_messages, $composesession, $default_charset;
 
     $composeMessage = $compose_messages[$session];
@@ -981,7 +978,7 @@ function showInputForm ($session, $values=false) {
     if ($compose_new_win == '1') {
         echo '<table align="center" bgcolor="'.$color[0].'" width="100%" border="0">'."\n" .
             '   <tr><td></td>'.html_tag( 'td', '', 'right' ).
-            '<input type="button" name="Close" onClick="return self.close()" value="'.
+            '<input type="button" name="Close" onclick="return self.close()" value="'.
             _("Close").'" /></td></tr>'."\n";
     }
     if ($location_of_buttons == 'top') {
@@ -1463,7 +1460,7 @@ function deliverMessage($composeMessage, $draft=false) {
     if (!$useSendmail && !$draft) {
         require_once(SM_PATH . 'class/deliver/Deliver_SMTP.class.php');
         $deliver = new Deliver_SMTP();
-        global $smtpServerAddress, $smtpPort, $pop_before_smtp, $smtp_auth_mech;
+        global $smtpServerAddress, $smtpPort, $pop_before_smtp;
 
         $authPop = (isset($pop_before_smtp) && $pop_before_smtp) ? true : false;
         get_smtp_user($user, $pass);