瀏覽代碼

Convert to using 'sqimap_run_command' too.

Bron Gondwana 23 年之前
父節點
當前提交
2cc3fd627c
共有 1 個文件被更改,包括 2 次插入5 次删除
  1. 2 5
      src/read_body.php

+ 2 - 5
src/read_body.php

@@ -147,8 +147,7 @@ do_hook('html_top');
 displayPageHeader($color, $mailbox);
 displayPageHeader($color, $mailbox);
 
 
 if (isset($view_hdr)) {
 if (isset($view_hdr)) {
-    fputs ($imapConnection, sqimap_session_id() . " FETCH $passed_id BODY[HEADER]\r\n");
-    $read = sqimap_read_data ($imapConnection, sqimap_session_id(), true, $a, $b);
+    $read = sqimap_run_command ($imapConnection, "FETCH $passed_id BODY[HEADER]", true, $a, $b);
 
 
     echo '<BR>' .
     echo '<BR>' .
         '<TABLE WIDTH="100%" CELLPADDING="2" CELLSPACING="0" BORDER="0" ALIGN="CENTER">' . "\n" .
         '<TABLE WIDTH="100%" CELLPADDING="2" CELLSPACING="0" BORDER="0" ALIGN="CENTER">' . "\n" .
@@ -620,9 +619,7 @@ if ($default_use_priority) {
 }
 }
 
 
 if ($show_xmailer_default) {
 if ($show_xmailer_default) {
-    fputs ($imapConnection, sqimap_session_id() .
-        " FETCH $passed_id BODY.PEEK[HEADER.FIELDS (X-Mailer User-Agent)]\r\n");
-    $read = sqimap_read_data ($imapConnection, sqimap_session_id(), true,
+    $read = sqimap_run_command ($imapConnection, "FETCH $passed_id BODY.PEEK[HEADER.FIELDS (X-Mailer User-Agent)]", true,
                             $response, $readmessage);
                             $response, $readmessage);
     $mailer = substr($read[1], strpos($read[1], " "));
     $mailer = substr($read[1], strpos($read[1], " "));
     if (trim($mailer)) {
     if (trim($mailer)) {