[horde] Filters (ingo)
Kolb Zoltán
kolb at bitlab.hu
Mon Feb 7 12:13:04 PST 2005
Hi!
The filters in horde 3.0.2 are great! However I was not able to filter on
mail headers with multiple instances (i.e. Received). Here is a patch to make
it work:
*** lib/Horde/IMAP/Search.php.orig 2005-01-27 11:22:57.000000000 +0100
--- lib/Horde/IMAP/Search.php 2005-01-27 11:25:08.000000000 +0100
***************
*** 318,326 ****
for example, e-mail addresses may not be caught correctly
(filtering for example at example.com will not catch
exAmple at example.com). */
! if (isset($h[$key]) &&
! (stristr($h[$key], strval($query)) !== false)) {
! $indices[] = $index;
}
}
--- 318,335 ----
for example, e-mail addresses may not be caught correctly
(filtering for example at example.com will not catch
exAmple at example.com). */
! if (isset($h[$key])) {
! if (is_array($h[$key])) {
! foreach($h[$key] as $idx => $value) {
! if (stristr($value, strval($query)) !== false) {
! $indices[] = $index;
! }
! }
! } else {
! if (stristr($h[$key], strval($query)) !== false) {
! $indices[] = $index;
! }
! }
}
}
Plus a feature request (idea): add "match/do not match" to
"contains/does not contain" to support regular expressions!
--
Best regards, Zoltan Kolb
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the horde
mailing list