projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
support for viewing headers of message/rfc822 attachments
[squirrelmail.git]
/
src
/
view_header.php
diff --git
a/src/view_header.php
b/src/view_header.php
index 24163065814b54a6cfca18c138d25a8dd2bd2d7c..9fcf8f1dac21446d25650a94edf368b6ed9c28eb 100644
(file)
--- a/
src/view_header.php
+++ b/
src/view_header.php
@@
-12,14
+12,18
@@
*/
*/
-function parse_viewheader($imapConnection,$id,
$template_vars
) {
+function parse_viewheader($imapConnection,$id,
$passed_ent_id
) {
global $uid_support;
$header_full = array();
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);
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]);
$cnum = 0;
for ($i=1; $i < count($read); $i++) {
$line = htmlspecialchars($read[$i]);
@@
-53,20
+57,15
@@
function parse_viewheader($imapConnection,$id,$template_vars) {
}
parseEmail($s);
if (isset($f)) {
}
parseEmail($s);
if (isset($f)) {
- $header_output[] = array($
s,$f);
+ $header_output[] = array($
f,$s);
}
}
}
}
-
sqimap_logout($imapConnection);
sqimap_logout($imapConnection);
-
- $template_vars['full_header'] = $header_output;
-
- return $template_vars;
+ return $header_output;
}
function view_header($template_vars, $pageheader='', $pagefooter='') {
}
function view_header($template_vars, $pageheader='', $pagefooter='') {
-
-global $color;
+ global $color;
echo $pageheader;
echo '<BR>' .
echo $pageheader;
echo '<BR>' .
@@
-81,8
+80,7
@@
global $color;
echo_template_var($template_vars['full_header'],
array(
"<table width='99%' cellpadding='2' cellspacing='0' border='0'".
echo_template_var($template_vars['full_header'],
array(
"<table width='99%' cellpadding='2' cellspacing='0' border='0'".
- "align=center>\n".
-'<tr><td>',
+ "align=center>\n".'<tr><td>',
'<nobr><tt><b>',
'</b>',
'</tt></nobr>',
'<nobr><tt><b>',
'</b>',
'</tt></nobr>',