瀏覽代碼

fix for sending MDN with the javascript confirm dialog. The old method
didn't sent a MDN (at least with IE6) !!!

stekkel 23 年之前
父節點
當前提交
01bd5a31ea
共有 1 個文件被更改,包括 1 次插入4 次删除
  1. 1 4
      src/read_body.php

+ 1 - 4
src/read_body.php

@@ -261,7 +261,6 @@ function SendMDN ( $recipient , $sender) {
 function ToggleMDNflag ( $set ) {
 function ToggleMDNflag ( $set ) {
     global $imapConnection, $passed_id, $mailbox;
     global $imapConnection, $passed_id, $mailbox;
     sqimap_mailbox_select($imapConnection, $mailbox);
     sqimap_mailbox_select($imapConnection, $mailbox);
-    
     $sg =  $set?'+':'-';
     $sg =  $set?'+':'-';
     $cmd = 'STORE ' . $passed_id . ' ' . $sg . 'FLAGS ($MDNSent)';
     $cmd = 'STORE ' . $passed_id . ' ' . $sg . 'FLAGS ($MDNSent)';
     $read = sqimap_run_command ($imapConnection, $cmd, true, $response, 
     $read = sqimap_run_command ($imapConnection, $cmd, true, $response, 
@@ -920,7 +919,6 @@ if ($default_use_mdn) {
 
 
         $read = sqimap_run_command ($imapConnection, "FETCH $passed_id FLAGS", true,
         $read = sqimap_run_command ($imapConnection, "FETCH $passed_id FLAGS", true,
                                 $response, $readmessage);
                                 $response, $readmessage);
-
         $MDN_flag_present = preg_match( '/.*\$MDNSent/i', $read[0]);
         $MDN_flag_present = preg_match( '/.*\$MDNSent/i', $read[0]);
 
 
         if (trim($MDN_to) &&
         if (trim($MDN_to) &&
@@ -987,8 +985,7 @@ if ($default_use_mdn) {
                     "               if (window.confirm(\"" .
                     "               if (window.confirm(\"" .
                     _("The message sender has requested a response to indicate that you have read this message. Would you like to send a receipt?") .
                     _("The message sender has requested a response to indicate that you have read this message. Would you like to send a receipt?") .
                     "\")) {  \n" .
                     "\")) {  \n" .
-                    "                       window.location=($url); \n" .
-                    '                       window.location.reload()' . "\n" .
+                    '                       window.open('.$url.',"_self")' . "\n" .
                     '               }' . "\n" .
                     '               }' . "\n" .
                     '// -->' . "\n" .
                     '// -->' . "\n" .
                     '</script>' . "\n";
                     '</script>' . "\n";