X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fread_body.php;h=2d6dc5553f05088dc3a78710fb1c8b8d91775bca;hb=32c661f4796c4d3725be5602397faabac6d2dcf2;hp=f0c8b1e99174e2257e1ac6dd0f71e643712b5a6c;hpb=b53758b67ebfc21be68d3455a9b190c23fd0d477;p=squirrelmail.git diff --git a/src/read_body.php b/src/read_body.php index f0c8b1e9..2d6dc555 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -32,10 +32,10 @@ function findNextMessage() { $server_sort_array; if (!is_array($server_sort_array)) { $thread_sort_messages = 0; - $allow_server_sort = 'false'; + $allow_server_sort = FALSE; } $result = -1; - if ($thread_sort_messages == 1 || $allow_server_sort == 'true') { + if ($thread_sort_messages == 1 || $allow_server_sort == TRUE) { reset($server_sort_array); while(list($key, $value) = each ($server_sort_array)) { if ($currentArrayIndex == $value) { @@ -48,13 +48,13 @@ function findNextMessage() { } } } - elseif ($sort == 6 && $allow_server_sort != 'true' && + elseif ($sort == 6 && $allow_server_sort != TRUE && $thread_sort_messages != 1) { if ($currentArrayIndex != 1) { $result = $currentArrayIndex - 1; } } - elseif ($allow_server_sort != 'true' && $thread_sort_messages != 1 ) { + elseif ($allow_server_sort != TRUE && $thread_sort_messages != 1 ) { if (!is_array($msort)) { return -1; } @@ -95,9 +95,9 @@ function findPreviousMessage() { $result = -1; if (!is_array($server_sort_array)) { $thread_sort_messages = 0; - $allow_server_sort = 'false'; + $allow_server_sort = FALSE; } - if ($thread_sort_messages == 1 || $allow_server_sort == 'true') { + if ($thread_sort_messages == 1 || $allow_server_sort == TRUE) { reset($server_sort_array); while(list($key, $value) = each ($server_sort_array)) { if ($currentArrayIndex == $value) { @@ -110,14 +110,14 @@ function findPreviousMessage() { } } } - elseif ($sort == 6 && $allow_server_sort != 'true' && + elseif ($sort == 6 && $allow_server_sort != TRUE && $thread_sort_messages != 1) { $numMessages = sqimap_get_num_messages($imapConnection, $mailbox); if ($currentArrayIndex != $numMessages) { $result = $currentArrayIndex + 1; } } - elseif ($thread_sort_messages != 1 && $allow_server_sort != 'true') { + elseif ($thread_sort_messages != 1 && $allow_server_sort != TRUE) { if (!is_array($msort)) { return -1; } @@ -261,7 +261,6 @@ function SendMDN ( $recipient , $sender) { function ToggleMDNflag ( $set ) { global $imapConnection, $passed_id, $mailbox; sqimap_mailbox_select($imapConnection, $mailbox); - $sg = $set?'+':'-'; $cmd = 'STORE ' . $passed_id . ' ' . $sg . 'FLAGS ($MDNSent)'; $read = sqimap_run_command ($imapConnection, $cmd, true, $response, @@ -275,7 +274,7 @@ function ClearAttachments() { $rem_attachments = array(); foreach ($attachments as $info) { - if ($info->session == -1) { + if ($info['session'] == -1) { $attached_file = "$hashed_attachment_dir/$info[localfilename]"; if (file_exists($attached_file)) { unlink($attached_file); @@ -584,7 +583,9 @@ $dateString = getLongDateString($message->header->date); /** * What do we reply to -- text only, if possible */ -$ent_num = findDisplayEntity($message); +$ent_ar = findDisplayEntity($message); +/* first step in displaying multiple entities */ +$ent_num = $ent_ar[0]; /** TEXT STRINGS DEFINITIONS **/ $echo_more = _("more"); @@ -690,19 +691,31 @@ if ($where && $what) { } echo _("Delete") . ' '; if (($mailbox == $draft_folder) && ($save_as_draft)) { - echo '| '. _("Resume Draft") . ''; } if ($mailbox == $sent_folder) { - echo '| '. _("Edit Message as New") . ''; @@ -737,31 +750,49 @@ if ( !($where && $what) ) { echo '' . '
\n" .
' '. - formatBody($imapConnection, $message, $color, $wrap_at). + formatBody($imapConnection, $message, $color, $wrap_at, $ent_num). ' |