From e5fdc7717bd490f646a9b12e0fd01f679bb6d7ab Mon Sep 17 00:00:00 2001 From: stekkel Date: Thu, 30 May 2002 20:53:48 +0000 Subject: [PATCH] modification to get the text entity in case we are dealing with alternative messages. The entity is parsed as ent_num to compose.php. preparation of parsing multiple entities to compose.php git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2916 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/read_body.php | 45 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/src/read_body.php b/src/read_body.php index 2d6dc555..8176ebbc 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -583,10 +583,44 @@ $dateString = getLongDateString($message->header->date); /** * What do we reply to -- text only, if possible */ -$ent_ar = findDisplayEntity($message); + +$body = ''; + +/* experimental */ +/* +if ($message->header->type0 == 'multipart' && $message->header->type1 == 'digest') { + listEntities($message); + for ($i = 0; $i < count($message->entities); $i++) { + + $msg = $message->entities[$i]; + $body .= $msg->header->type0 .'/'.$msg->header->type1 .'
'; + + $msg->header->type0 = 'message'; + $msg->header->type1 = 'rfc822'; + $ent_ar = findDisplayEntity($msg, false); + for ($i = 0; $i < count($ent_ar); $i++) { + $body .= formatBody($imapConnection, $msg, $color, $wrap_at, $ent_ar[$i]); + } + $i++; + } +} else { +*/ + $ent_ar = findDisplayEntity($message, false); + $i = 0; + for ($i = 0; $i < count($ent_ar); $i++) { + $body .= formatBody($imapConnection, $message, $color, $wrap_at, $ent_ar[$i]); + } +/* +} +*/ + /* first step in displaying multiple entities */ -$ent_num = $ent_ar[0]; +$ent_ar = findDisplayEntity($message,true); +$ent_num = $ent_num_ar[0]; +for ($i = 1 ; $i < count($ent_ar); $i++) { + $ent_num .= '_'.$ent_num_ar[$i]; +} /** TEXT STRINGS DEFINITIONS **/ $echo_more = _("more"); $echo_less = _("less"); @@ -1075,9 +1109,10 @@ echo '' . flush(); echo "\n" . "
\n" . - '
'. - formatBody($imapConnection, $message, $color, $wrap_at, $ent_num). - '
' . + '
'; +echo $body; + +echo '' . '' . "\n" . " " . '
 
' . "\n"; -- 2.25.1