diff options
author | thomascube <thomas@roundcube.net> | 2008-06-20 12:05:42 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2008-06-20 12:05:42 +0000 |
commit | 4dae735feb47918008e289f19d7d5d17462a0682 (patch) | |
tree | abf777f2cff253f5d31f771e0288955ace19dfa0 /program | |
parent | fde466c58c004e8f7eff7b59c78f62eef250cde9 (diff) |
Flag original message as Forwarded when sending mail
Diffstat (limited to 'program')
-rw-r--r-- | program/lib/imap.inc | 15 | ||||
-rw-r--r-- | program/steps/mail/compose.inc | 4 | ||||
-rw-r--r-- | program/steps/mail/sendmail.inc | 6 |
3 files changed, 11 insertions, 14 deletions
diff --git a/program/lib/imap.inc b/program/lib/imap.inc index 7a1ac0aa7..ce02071b6 100644 --- a/program/lib/imap.inc +++ b/program/lib/imap.inc @@ -147,6 +147,7 @@ class iilBasicHeader var $deleted = false; var $recent = false; var $answered = false; + var $forwarded = false; var $junk = false; } @@ -1741,11 +1742,6 @@ function iil_C_FetchHeaders(&$conn, $mailbox, $message_set, $uidfetch=false) // process flags $flags_str = eregi_replace('[\\\"]', '', $flags_str); $flags_a = explode(' ', $flags_str); - - /* - trigger_error("<!-- ID: $id FLAGS: ".implode(",", $flags_a)." //-->\n", - E_USER_WARNING); - */ if (is_array($flags_a)) { reset($flags_a); @@ -1758,9 +1754,11 @@ function iil_C_FetchHeaders(&$conn, $mailbox, $message_set, $uidfetch=false) $result[$id]->recent = true; } else if (strcasecmp($val, 'Answered') == 0) { $result[$id]->answered = true; - } else if (strcasecmp($val, "\$MDNSent") == 0) { + } else if (strcasecmp($val, '$Forwarded') == 0) { + $result[$id]->forwarded = true; + } else if (strcasecmp($val, '$MDNSent') == 0) { $result[$id]->mdn_sent = true; - } + } } $result[$id]->flags = $flags_a; } @@ -1915,7 +1913,8 @@ function iil_C_ModFlag(&$conn, $mailbox, $messages, $flag, $mod) { 'ANSWERED' => '\\Answered', 'DRAFT' => '\\Draft', 'FLAGGED' => '\\Flagged', - 'MDNSENT' => "\$MDNSent"); + 'FORWARDED' => '$Forwarded', + 'MDNSENT' => '$MDNSent'); $flag = strtoupper($flag); $flag = $flags[$flag]; diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 800a9de85..5d23c1533 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -105,10 +105,6 @@ if (!empty($msg_uid)) { $_SESSION['compose']['forward_uid'] = $msg_uid; } - else if ($compose_mode == RCUBE_COMPOSE_DRAFT) - { - $_SESSION['compose']['draft_uid'] = $msg_uid; - } } /****** compose mode functions ********/ diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index 44f2bdf6c..babde48b9 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -348,11 +348,13 @@ if (!$savedraft) return; } - // set repliead flag + // set replied/forwarded flag if ($_SESSION['compose']['reply_uid']) $IMAP->set_flag($_SESSION['compose']['reply_uid'], 'ANSWERED'); + else if ($_SESSION['compose']['forward_uid']) + $IMAP->set_flag($_SESSION['compose']['forward_uid'], 'FORWARDED'); - } // End of SMTP Delivery Block +} // End of SMTP Delivery Block |