X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fview_header.php;h=4f86662d13072bb75da76615c82486b52f3ec6e4;hb=a75e70b1b5fb3a111e84cf658cc6937a8e97dc2c;hp=3e1f6e35beaf9c46f7a6a165cb3c5b7e2c5f94a9;hpb=fdc9d9b593d6588e23877751d42ee6ca29e0ba6a;p=squirrelmail.git diff --git a/src/view_header.php b/src/view_header.php index 3e1f6e35..4f86662d 100644 --- a/src/view_header.php +++ b/src/view_header.php @@ -9,29 +9,31 @@ * This is the code to view the message header. * * $Id$ + * @package squirrelmail */ -/* Path for SquirrelMail required files. */ +/** Path for SquirrelMail required files. */ define('SM_PATH','../'); /* SquirrelMail required files. */ require_once(SM_PATH . 'include/validate.php'); +require_once(SM_PATH . 'functions/global.php'); require_once(SM_PATH . 'functions/imap.php'); require_once(SM_PATH . 'functions/html.php'); require_once(SM_PATH . 'functions/url_parser.php'); function parse_viewheader($imapConnection,$id, $passed_ent_id) { - global $uid_support; + global $uid_support; - $header_full = array(); - if (!$passed_ent_id) { - $read=sqimap_run_command ($imapConnection, "FETCH $id BODY[HEADER]", + $header_full = array(); + 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, + } 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]); @@ -64,9 +66,11 @@ function parse_viewheader($imapConnection,$id, $passed_ent_id) { $s .= '    ' . nl2br($second[$j]); $j++; } - if(strtolower($f) != 'message-id:') { - parseEmail($s); - } + $lowf=strtolower($f); + /* do not mark these headers as emailaddresses */ + if($lowf != 'message-id:' && $lowf != 'in-reply-to:' && $lowf != 'references:') { + parseEmail($s); + } if ($f) { $header_output[] = array($f,$s); }