support for viewing headers of message/rfc822 attachments
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 29 Jul 2002 22:26:29 +0000 (22:26 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 29 Jul 2002 22:26:29 +0000 (22:26 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3169 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/view_header.php

index 7bead91..9fcf8f1 100644 (file)
  */
 
 
-function  parse_viewheader($imapConnection,$id) {
+function  parse_viewheader($imapConnection,$id, $passed_ent_id) {
    global $uid_support;
 
    $header_full = array();
-
-   $read=sqimap_run_command ($imapConnection, "FETCH $id BODY[HEADER]", 
+   if (!$passed_ent_id) {
+       $read=sqimap_run_command ($imapConnection, "FETCH $id BODY[HEADER]", 
                               true, $a, $b, $uid_support);
-
+   } else {
+       $query = "FETCH $id BODY[".$passed_ent_id.'.HEADER]';
+       $read=sqimap_run_command ($imapConnection, $query, 
+                              true, $a, $b, $uid_support);
+   }    
     $cnum = 0;
     for ($i=1; $i < count($read); $i++) {
         $line = htmlspecialchars($read[$i]);