From 9f42bfc891d7a9d595e722b8d9cab8b6b6c6bf44 Mon Sep 17 00:00:00 2001 From: indiri69 Date: Mon, 28 Oct 2002 22:30:34 +0000 Subject: [PATCH] Formatting cleanups git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4055 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/read_body.php | 61 +++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/src/read_body.php b/src/read_body.php index 8d5409d9..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") . ''; } @@ -555,11 +554,11 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp $c = 0; foreach($message->parent->entities as $ent) { - if ($ent->type0 == 'message' && $ent->type1 == 'rfc822') { - $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"); @@ -589,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"); @@ -637,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']; @@ -729,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); /** @@ -738,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; @@ -799,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()); -- 2.25.1