Browse Source

Made the option to keep your address in the CC when you hit Reply All

Tyler Akins 24 years ago
parent
commit
032cf6aa44
3 changed files with 31 additions and 9 deletions
  1. 4 0
      src/options.php
  2. 14 0
      src/options_display.php
  3. 13 9
      src/read_body.php

+ 4 - 0
src/options.php

@@ -87,6 +87,10 @@
          setPref($data_dir, $username, 'show_html_default', 1);
          setPref($data_dir, $username, 'show_html_default', 1);
       else
       else
          removePref($data_dir, $username, 'show_html_default');
          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');
       do_hook('options_display_save');
 
 

+ 14 - 0
src/options_display.php

@@ -234,6 +234,20 @@ echo _("Yes, show me the HTML version of a mail message, if it is available.");
                  ?>
                  ?>
             </td>
             </td>
          </tr>
          </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'); ?>
          <?php do_hook('options_display_inside'); ?>
          <tr>
          <tr>
             <td>&nbsp;
             <td>&nbsp;

+ 13 - 9
src/read_body.php

@@ -190,18 +190,22 @@
    }
    }
    
    
    // 6) Remove our identities from the CC list (they still can be in the
    // 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
    // 7) Smoosh back into one nice line
    $url_replytoallcc = getLineOfAddrs($url_replytoall_extra_addrs);
    $url_replytoallcc = getLineOfAddrs($url_replytoall_extra_addrs);