Add ability to filter on the Message body, or if text appears any where in the messag...
authorcigamit <cigamit@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 21 Mar 2005 22:42:53 +0000 (22:42 +0000)
committercigamit <cigamit@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 21 Mar 2005 22:42:53 +0000 (22:42 +0000)
The strings are already translated via our search form
This should close Feature Request # 509443

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9126 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/filters/filters.php
plugins/filters/options.php

index a414573dd33f8da667ea0e1e1a40e9c7680e91f2..98935f3b6861835df65f3f6565ac2554a1ce5032 100644 (file)
@@ -240,6 +240,12 @@ function user_filters($imap_stream) {
                   $filters[$i]['what'], $filters[$i]['folder'], $filters_user_scan, $expunge);
             $expunge = filter_search_and_delete($imap_stream, 'CC',
                   $filters[$i]['what'], $filters[$i]['folder'], $filters_user_scan, $expunge);
+        } else if ($filters[$i]['where'] == 'Header and Body') {
+            $expunge = filter_search_and_delete($imap_stream, 'TEXT',
+                  $filters[$i]['what'], $filters[$i]['folder'], $filters_user_scan, $expunge);
+        } else if ($filters[$i]['where'] == 'Message Body') {
+            $expunge = filter_search_and_delete($imap_stream, 'BODY',
+                  $filters[$i]['what'], $filters[$i]['folder'], $filters_user_scan, $expunge);                  
         } else {
             /*
             *  If it's a normal TO, CC, SUBJECT, or FROM, then handle it
index a250aedd63aae054bed487c3aec2a07e81986973..161891dc7336c0b0ab5c4f9019d2dc912b85b65c 100644 (file)
@@ -191,6 +191,12 @@ if (sqgetGlobalVar('filter_submit',$filter_submit,SQ_POST)) {
         $sel = (($L && $filters[$theid]['where'] == 'Subject')?' selected="selected"':'');
         echo "<option value=\"Subject\"$sel>" . _("Subject") . '</option>';
 
+        $sel = (($L && $filters[$theid]['where'] == 'Message Body')?' selected="selected"':'');
+        echo "<option value=\"Message Body\"$sel>" . _("Message Body") . '</option>';
+
+        $sel = (($L && $filters[$theid]['where'] == 'Header and Body')?' selected="selected"':'');
+        echo "<option value=\"Header and Body\"$sel>" . _("Header and Body") . '</option>';
+
         $sel = (($L && $filters[$theid]['where'] == 'Header')?' selected="selected"':'');
         echo "<option value=\"Header\"$sel>" . _("Header") . '</option>';