Made the option to keep your address in the CC when you hit Reply All
authorfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 25 Jun 2001 18:55:17 +0000 (18:55 +0000)
committerfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 25 Jun 2001 18:55:17 +0000 (18:55 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1429 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/options.php
src/options_display.php
src/read_body.php

index 3e079eb..9052521 100644 (file)
          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');
 
index 88b8c26..0882b7e 100644 (file)
@@ -234,6 +234,20 @@ echo _("Yes, show me the HTML version of a mail message, if it is available.");
                  ?>
             </td>
          </tr>
+         <tr>
+            <td align=right>
+               <?php echo _("Include Self"); ?>:
+            </td>
+            <td>
+               <input type=checkbox name=includeselfreplyall <?php 
+              if (getPref($data_dir, $username, 'include_self_reply_all')
+                  != '')
+              echo " checked"; ?>>
+                <?php 
+echo _("Don't remove me from the CC addresses when I use \"Reply All\"");
+                 ?>
+            </td>
+         </tr>
          <?php do_hook('options_display_inside'); ?>
          <tr>
             <td>&nbsp;
index 28733de..5010dd1 100644 (file)
    }
    
    // 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);