} else {
$orig_from = decodeHeader($orig_from->getAddress(false),false,false,true);
}
+
// $from = decodeHeader($orig_header->getAddr_s('from',"\n$indent"),false,false);
/* First, return an empty string when no citation style selected. */
case 'date_time_author':
/**
* To translators:
- * first %s is for date string, second %s is for author's name. Date uses
+ * first %s is for date string, second %s is for author's name. Date uses
* formating from "D, F j, Y g:i a" and "D, F j, Y H:i" translations.
* Example string:
* "On Sat, December 24, 2004 23:59, Santa said:"
/**
* Creates header fields in forwarded email body
*
- * $default_charset global must be set correctly before you call this function.
+ * $default_charset global must be set correctly before you call this function.
* @param object $orig_header
- * @return $string
+ * @return $string
*/
function getforwardHeader($orig_header) {
global $editor_size, $default_charset;
if ($compose_new_win == '1') {
compose_Header($color, $mailbox);
} else {
- displayPageHeader($color, $mailbox);
+ $sHeaderJs = (isset($sHeaderJs)) ? $sHeaderJs : '';
+ if (strpos($action, 'reply') !== false && $reply_focus) {
+ $sBodyTagJs = 'onload="checkForm(\''.$replyfocus.'\');"';
+ } else {
+ $sBodyTagJs = 'onload="checkForm();"';
+ }
+ displayPageHeader($color, $mailbox,$sHeaderJs,$sBodyTagJs);
}
showInputForm($session, false);
exit();
if (!isset($compose_messages)) {
$compose_messages = array();
}
+
if (!isset($compose_messages[$session]) || ($compose_messages[$session] == NULL)) {
/* if (!array_key_exists($session, $compose_messages)) { /* We can only do this in PHP >= 4.1 */
$composeMessage = new Message();
$composeMessage->rfc822_header = $rfc822_header;
$composeMessage->reply_rfc822_header = '';
$compose_messages[$session] = $composeMessage;
+
sqsession_register($compose_messages,'compose_messages');
} else {
$composeMessage=$compose_messages[$session];
$imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, false);
sqimap_mailbox_select($imap_stream, $draft_folder);
// force bypass_trash=true because message should be saved when deliverMessage() returns true.
- // in current implementation of sqimap_msgs_list_flag() single message id can
+ // in current implementation of sqimap_msgs_list_flag() single message id can
// be submitted as string. docs state that it should be array.
sqimap_msgs_list_delete($imap_stream, $draft_folder, $delete_draft, true);
if ($auto_expunge) {
$imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, false);
sqimap_mailbox_select($imap_stream, $draft_folder);
// bypass_trash=true because message should be saved when deliverMessage() returns true.
- // in current implementation of sqimap_msgs_list_flag() single message id can
+ // in current implementation of sqimap_msgs_list_flag() single message id can
// be submitted as string. docs state that it should be array.
sqimap_msgs_list_delete($imap_stream, $draft_folder, $delete_draft, true);
if ($auto_expunge) {
// forwarded message text should be as undisturbed as possible, so commenting out this call
// sqUnWordWrap($body);
$composeMessage = getAttachments($message, $composeMessage, $passed_id, $entities, $imapConnection);
+
//add a blank line after the forward headers
$body = "\n" . $body;
break;
* @param integer $passed_id
* @param mixed $entities
* @param mixed $imapConnection
- * @return object
+ * @return object
*/
function getAttachments($message, &$composeMessage, $passed_id, $entities, $imapConnection) {
global $attachment_dir, $username, $data_dir, $squirrelmail_language, $languages;
/* Write Attachment to file */
$fp = fopen ("$hashed_attachment_dir/$localfilename", 'wb');
- fputs($fp, decodeBody(mime_fetch_body($imapConnection,
- $passed_id, $message->entity_id),
- $message->header->encoding));
+ mime_print_body_lines ($imapConnection, $passed_id, $message->entity_id, $message->header->encoding, $fp);
fclose ($fp);
}
} else {
$mailprio, $compose_new_win, $saved_draft, $mail_sent, $sig_first,
$username, $compose_messages, $composesession, $default_charset;
+
$composeMessage = $compose_messages[$session];
if ($values) {
$send_to = $values['send_to'];
/*
* FIXME: test is specific to ja_JP translation implementation.
* This test might apply incorrect conversion to other translations, but
- * use of 7bit iso-2022-jp charset in other translations might have other
+ * use of 7bit iso-2022-jp charset in other translations might have other
* issues too.
*/
if ($default_charset == 'iso-2022-jp') {
function saveAttachedFiles($session) {
global $_FILES, $attachment_dir, $attachments, $username,
$data_dir, $compose_messages;
-
/* get out of here if no file was attached at all */
if (! is_uploaded_file($_FILES['attachfile']['tmp_name']) ) {
return true;
ClearAttachments($composeMessage);
if ($action == 'reply' || $action == 'reply_all') {
sqimap_mailbox_select ($imap_stream, $mailbox);
- sqimap_messages_flag ($imap_stream, $passed_id, $passed_id, 'Answered', false);
+ sqimap_toggle_flag($imap_stream, array($passed_id), '\\Answered', true, false);
}
sqimap_logout($imap_stream);
}
}
// vim: et ts=4
-?>
+?>
\ No newline at end of file