X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fread_body.php;h=a85361f8664bd48a488d01f41cc728dd4fca7bdb;hb=9f42bfc891d7a9d595e722b8d9cab8b6b6c6bf44;hp=1ac417cf9a5dff0defba0ad8be66c9eea111bd1b;hpb=e55c441acad8944c234ca69c02558c3ec73fd2e6;p=squirrelmail.git
diff --git a/src/read_body.php b/src/read_body.php
index 1ac417cf..a85361f8 100644
--- a/src/read_body.php
+++ b/src/read_body.php
@@ -120,18 +120,18 @@ function printer_friendly_link($mailbox, $passed_id, $passed_ent_id, $color) {
$result = '';
/* Output the link. */
if ($javascript_on) {
- $result .= '\n" .
- "$print_text\n";
+ $result = '\n" .
+ "$print_text\n";
} else {
- $result .= '$print_text\n";
+ $result = '$print_text\n";
}
return $result;
}
@@ -305,7 +305,6 @@ function SendMDN ( $mailbox, $passed_id, $sender, $message, $imapConnection) {
return $success;
}
-
function ToggleMDNflag ($set ,$imapConnection, $mailbox, $passed_id, $uid_support) {
$sg = $set?'+':'-';
$cmd = 'STORE ' . $passed_id . ' ' . $sg . 'FLAGS ($MDNSent)';
@@ -487,7 +486,6 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp
$msgs_str = _("Message List");
}
$s .= '' . $msgs_str . '';
- $s .= $topbar_delimiter;
$delete_url = $base_uri . 'src/delete_message.php?mailbox=' . $urlMailbox .
'&message=' . $passed_id . '&';
@@ -497,6 +495,7 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp
} else {
$delete_url .= 'sort=' . $sort . '&startMessage=' . $startMessage;
}
+ $s .= $topbar_delimiter;
$s .= '' . _("Delete") . '';
}
@@ -553,10 +552,13 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp
$entities = array();
$entity_count = array();
$c = 0;
+
foreach($message->parent->entities as $ent) {
- $c++;
- $entity_count[$c] = $ent->entity_id;
- $entities[$ent->entity_id] = $c;
+ if ($ent->type0 == 'message' && $ent->type1 == 'rfc822') {
+ $c++;
+ $entity_count[$c] = $ent->entity_id;
+ $entities[$ent->entity_id] = $c;
+ }
}
$prev_link = _("Previous");
$next_link = _("Next");
@@ -586,19 +588,19 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp
$s .= '' . "\n" . '
';
$comp_action_uri = $comp_uri . '&action=forward';
$s .= $link_open . $comp_action_uri . $link_close . _("Forward") . '';
- $s .= $topbar_delimiter;
if ($enable_forward_as_attachment) {
$comp_action_uri = $comp_uri . '&action=forward_as_attachment';
- $s .= $link_open . $comp_action_uri . $link_close . _("Forward as Attachment") . '';
$s .= $topbar_delimiter;
+ $s .= $link_open . $comp_action_uri . $link_close . _("Forward as Attachment") . '';
}
$comp_action_uri = decodeHeader($comp_uri . '&action=reply');
- $s .= $link_open . $comp_action_uri . $link_close . _("Reply") . '';
$s .= $topbar_delimiter;
+ $s .= $link_open . $comp_action_uri . $link_close . _("Reply") . '';
$comp_action_uri = $comp_uri . '&action=reply_all';
+ $s .= $topbar_delimiter;
$s .= $link_open . $comp_action_uri . $link_close . _("Reply All") . '';
$s .= ' | ';
do_hook("read_body_menu_top");
@@ -634,12 +636,12 @@ function formatToolbar($mailbox, $passed_id, $passed_ent_id, $message, $color) {
/* get the globals we may need */
-$username = $_SESSION['username'];
-$key = $_COOKIE['key'];
+$username = $_SESSION['username'];
+$key = $_COOKIE['key'];
$onetimepad = $_SESSION['onetimepad'];
-$msgs = $_SESSION['msgs'];
-$base_uri = $_SESSION['base_uri'];
-$delimiter = $_SESSION['delimiter'];
+$msgs = $_SESSION['msgs'];
+$base_uri = $_SESSION['base_uri'];
+$delimiter = $_SESSION['delimiter'];
if (isset($_GET['passed_id'])) {
$passed_id = $_GET['passed_id'];
@@ -726,7 +728,7 @@ if (isset($mailbox)) {
}
$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
-$mbx_response = sqimap_mailbox_select($imapConnection, $mailbox, false, false, true);
+$mbx_response = sqimap_mailbox_select($imapConnection, $mailbox, false, false, true);
/**
@@ -735,10 +737,10 @@ $mbx_response = sqimap_mailbox_select($imapConnection, $mailbox, false, false, t
*/
$uidvalidity = $mbx_response['UIDVALIDITY'];
-
+
if (!isset($messages[$uidvalidity])) {
$messages[$uidvalidity] = array();
-}
+}
if (!isset($messages[$uidvalidity][$passed_id]) || !$uid_support) {
$message = sqimap_get_message($imapConnection, $passed_id, $mailbox);
$FirstTimeSee = !$message->is_seen;
@@ -796,8 +798,8 @@ if (isset($sendreceipt)) {
/***********************************************/
$msgs[$passed_id]['FLAG_SEEN'] = true;
-
-$messagebody = '';
+
+$messagebody = '';
do_hook('read_body_top');
if ($show_html_default == 1) {
$ent_ar = $message->findDisplayEntity(array());
@@ -823,7 +825,7 @@ echo ' ';
echo ' ';
echo ' ' . html_tag( 'td', ' '. $messagebody."\n", 'left')
- . '';
+ . ' ';
echo ' ';
echo ' | ';
echo '
';
@@ -831,7 +833,7 @@ echo ' ';
echo ' ';
echo ' |
'."\n";
+ $color[4].'"> |
'."\n";
$attachmentsdisplay = formatAttachments($message,$ent_ar,$mailbox, $passed_id);
if ($attachmentsdisplay) {
@@ -846,10 +848,11 @@ if ($attachmentsdisplay) {
echo ' ';
echo $attachmentsdisplay;
echo ' |
';
- echo ' ';
- echo ' ';
- echo ' ';
+ echo ' ';
+ echo ' ';
echo ' ';
+ echo ' |
';
}
echo '';