summaryrefslogtreecommitdiff
path: root/program/steps/mail/search.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2007-11-06 18:24:25 +0000
committerthomascube <thomas@roundcube.net>2007-11-06 18:24:25 +0000
commite4867ea740cd0d03acb65fdc7a93f7764cc711b2 (patch)
treebc7328f4a8573a212462affb134ae8f5072c8244 /program/steps/mail/search.inc
parentff0566bce5e960143a954e2c1356894a31e4f739 (diff)
Fix bugs #1484555, #1484646 and #1484639
Diffstat (limited to 'program/steps/mail/search.inc')
-rw-r--r--program/steps/mail/search.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/program/steps/mail/search.inc b/program/steps/mail/search.inc
index a3f6dda66..5ed6627ef 100644
--- a/program/steps/mail/search.inc
+++ b/program/steps/mail/search.inc
@@ -64,7 +64,8 @@ else if (preg_match("/^body:/i", $str))
// search in subject and sender by default
else
{
- $subject = array("HEADER SUBJECT", "HEADER FROM");
+ $from = ($mbox == $CONFIG['sent_mbox'] || $mbox == $CONFIG['drafts_mbox']) ? "TO" : "FROM";
+ $subject = array("HEADER SUBJECT", "HEADER $from");
$search = trim($str);
}