From a13cf2438e11aca61e111ee4ef7715a45ba2069f Mon Sep 17 00:00:00 2001 From: fidian Date: Mon, 25 Jun 2001 18:55:17 +0000 Subject: [PATCH] Made the option to keep your address in the CC when you hit Reply All git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1429 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/options.php | 4 ++++ src/options_display.php | 14 ++++++++++++++ src/read_body.php | 22 +++++++++++++--------- 3 files changed, 31 insertions(+), 9 deletions(-) diff --git a/src/options.php b/src/options.php index 3e079ebe..90525217 100644 --- a/src/options.php +++ b/src/options.php @@ -87,6 +87,10 @@ setPref($data_dir, $username, 'show_html_default', 1); else removePref($data_dir, $username, 'show_html_default'); + if (isset($includeselfreplyall)) + setPref($data_dir, $username, 'include_self_reply_all', 1); + else + removePref($data_dir, $username, 'include_self_reply_all'); do_hook('options_display_save'); diff --git a/src/options_display.php b/src/options_display.php index 88b8c265..0882b7ef 100644 --- a/src/options_display.php +++ b/src/options_display.php @@ -234,6 +234,20 @@ echo _("Yes, show me the HTML version of a mail message, if it is available."); ?> + + + : + + + > + + +   diff --git a/src/read_body.php b/src/read_body.php index 28733de0..5010dd15 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -190,18 +190,22 @@ } // 6) Remove our identities from the CC list (they still can be in the - // TO list) - RemoveAddress($url_replytoall_extra_addrs, getPref($data_dir, $username, - 'email_address')); - $idents = getPref($data_dir, $username, 'identities'); - if ($idents != '' && $idents > 1) + // TO list) only if $include_self_reply_all isn't set or it is ''. + if (getPref($data_dir, $username, 'include_self_reply_all') == '') { - for ($i = 1; $i < $idents; $i ++) + RemoveAddress($url_replytoall_extra_addrs, + getPref($data_dir, $username, 'email_address')); + $idents = getPref($data_dir, $username, 'identities'); + if ($idents != '' && $idents > 1) { - RemoveAddress($url_replytoall_extra_addrs, - getPref($data_dir, $username, 'email_address' . $i)); + for ($i = 1; $i < $idents; $i ++) + { + RemoveAddress($url_replytoall_extra_addrs, + getPref($data_dir, $username, 'email_address' . + $i)); + } } - } + } // 7) Smoosh back into one nice line $url_replytoallcc = getLineOfAddrs($url_replytoall_extra_addrs); -- 2.25.1