From 91f2085b188ea57c4c6a3ef13aa686ef2f622722 Mon Sep 17 00:00:00 2001 From: stekkel Date: Wed, 21 Aug 2002 13:43:49 +0000 Subject: [PATCH] fix for bug-report git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3385 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/compose.php | 56 ++++++++++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 21 deletions(-) diff --git a/src/compose.php b/src/compose.php index 1fa418d4..80814544 100644 --- a/src/compose.php +++ b/src/compose.php @@ -24,6 +24,7 @@ require_once('../functions/mime.php'); require_once('../functions/smtp.php'); require_once('../functions/plugin.php'); require_once('../functions/display_messages.php'); + /* --------------------- Specific Functions ------------------------------ */ function replyAllString($header) { @@ -157,7 +158,8 @@ if (!isset($composesession)) { if (!isset($session) || (isset($newmessage) && $newmessage)) { $session = "$composesession" +1; - $composesession = $session; + $composesession = $session; + session_register('composesession'); } if (!isset($mailbox) || $mailbox == '' || ($mailbox == 'None')) { @@ -423,11 +425,11 @@ exit(); /* This function is used when not sending or adding attachments */ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $session='') { - global $editor_size, $default_use_priority, + global $editor_size, $default_use_priority, $body, $use_signature, $composesession, $data_dir, $username, $username, $key, $imapServerAddress, $imapPort; - $send_to = $send_to_cc = $send_to_bcc = $subject = $body = $identity = ''; + $send_to = $send_to_cc = $send_to_bcc = $subject = $identity = ''; $mailprio = 3; if ($passed_id) { @@ -436,7 +438,7 @@ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $se sqimap_mailbox_select($imapConnection, $mailbox); $message = sqimap_get_message($imapConnection, $passed_id, $mailbox); - $body = ''; + $body = ''; if ($passed_ent_id) { /* redefine the messsage in case of message/rfc822 */ $message = $message->getEntity($passed_ent_id); @@ -867,6 +869,13 @@ function showInputForm ($session, $values=false) { } /* This code is for attachments */ + echo ''; + echo ' '; + /* End of attachment code */ if ($compose_new_win == '1') { echo '
'; + echo ' '; + echo ' '; + echo '
'; + echo ' '; + + echo ' ' . "\n" . ' ' . "\n" . ' ' . "\n"; + - if (count($attachments)) { - $hashed_attachment_dir = getHashedDir($username, $attachment_dir); - echo ''; + $s_a = array(); + $hashed_attachment_dir = getHashedDir($username, $attachment_dir); + foreach ($attachments as $key => $info) { + if ($info['session'] == $session) { + $attached_file = "$hashed_attachment_dir/$info[localfilename]"; + $s_a[] = '\n" . + $info['remotefilename'] . ' - ' . $info['type'] . ' (' . + show_readable_size( filesize( $attached_file ) ) . ")
\n"; + } } + if (count($s_a)) { + foreach ($s_a as $s) { + echo ''; + } + echo ''; + } + echo '
' . "\n" . _("Attach:") . @@ -877,25 +886,30 @@ function showInputForm ($session, $values=false) { ' value="' . _("Add") .'">' . "\n" . '
' . "\n" . - ' ' . - ''; - foreach ($attachments as $key => $info) { - if ($info['session'] == $session) { - $attached_file = "$hashed_attachment_dir/$info[localfilename]"; - echo '\n" . - $info['remotefilename'] . ' - ' . $info['type'] . ' (' . - show_readable_size( filesize( $attached_file ) ) . ")
\n"; - } - } - - echo '\n" . - '
'.$s.'
\n" . + '
'; + echo '
'."\n"; -- 2.25.1