From 62bdcb2bd5e7f9db0cd4b122a3171d5a6b25eef2 Mon Sep 17 00:00:00 2001 From: Peter Rotich <peter@osticket.com> Date: Fri, 7 Sep 2012 13:35:33 -0400 Subject: [PATCH] Make supported matches generic + double check filter target on email ID matches --- include/class.filter.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/include/class.filter.php b/include/class.filter.php index 696cd1025..ce7d7d92c 100644 --- a/include/class.filter.php +++ b/include/class.filter.php @@ -246,7 +246,9 @@ class Filter { $match = false; # Respect configured filter email-id - if ($this->getEmailId() && $this->getEmailId() != $info['emailId']) + if ($this->getEmailId() + && !strcasecmp($this->getTarget(), 'Email') + && $this->getEmailId() != $info['emailId']) return false; foreach ($this->getRules() as $rule) { @@ -303,10 +305,10 @@ class Filter { } /* static */ function getSupportedMatches() { return array( - 'name'=> "Sender's Name", - 'email'=> "Sender's Email", - 'subject'=> 'Email Subject', - 'body'=> 'Email Body/Text' + 'name'=> 'Name', + 'email'=> 'Email', + 'subject'=> 'Subject', + 'body'=> 'Body/Text' ); } /* static */ function getSupportedMatchTypes() { -- GitLab