Revisions for imp/lib/Filter.php

Location: [ Horde ] / imp / lib / Filter.php View: Logs | Branches | Statistics
Search Revisions:
Show diffs between and
Show Differences shows diffs to the previous revision. If you select a revision by clicking its row, Show Differences will show the differences to the selected row.
Show Branch:
  Revision Date Author Log Message
1.80 (+2 -2 lines) 10/13/2008 04:51 PM Michael M Slusarz slusarz

More merges from my private dev branch.

1.56.10.15 FRAMEWORK_3 (+4 -4 lines) 03/10/2008 01:13 PM Michael M Slusarz slusarz

IMP_MailboxCache -> IMP_MessageCache.

Tags: IMP_4_3, IMP_4_3_RC2, IMP_4_2_1_RC1, IMP_4_2, IMP_4_2_RC4, IMP_4_2_RC3

1.79 (+4 -4 lines) 03/07/2008 08:23 PM Michael M Slusarz slusarz

This has bothered me for the longest time - we are storing messages in this
cache, not mailboxes.  Change the library name now and corresponding config
options so we don't need to change them after 4.2 is released.

1.56.10.14 FRAMEWORK_3 (+2 -2 lines) 01/03/2008 02:07 AM Michael M Slusarz slusarz

Bug: 5234
MFH: Add hook for adding formatting information to a message list row.

Tags: IMP_4_2_RC2

1.56.10.13 FRAMEWORK_3 (+2 -2 lines) 01/02/2008 06:31 AM Jan Schneider jan

Happy New Year

1.78 (+2 -2 lines) 01/02/2008 06:12 AM Jan Schneider jan

Happy New Year

1.77 (+2 -2 lines) 12/26/2007 05:27 PM Michael M Slusarz slusarz

Bug: 5234
Merge after: 3 days
Add hook for adding formatting information to a message list row.

1.56.10.12 FRAMEWORK_3 (+41 -45 lines) 12/20/2007 08:59 AM Jan Schneider jan

Merge from HEAD.

1.76 (+6 -1 lines) 06/15/2007 08:08 AM Michael M Slusarz slusarz

Have blacklistMessage() return if it was successful in deleting.

Tags: BEFORE_MERGE_3_2, IMP_4_2_RC1, IMP_4_2_ALPHA

1.75 (+15 -9 lines) 06/13/2007 12:19 PM Jan Schneider jan

Make link in notification message optional.

1.56.10.11 FRAMEWORK_3 (+4 -1 lines) 03/02/2007 03:50 PM Michael M Slusarz slusarz

Bug: 5054
MFH: CHANGES - 1.1016; Filter.php - 1.74

Tags: IMP_4_1_6, IMP_4_1_5, IMP_4_1_4

1.74 (+3 -3 lines) 03/02/2007 03:46 PM Michael M Slusarz slusarz

Bug: 5054
Pass R/W stream to filters API.

1.73 (+14 -2 lines) 01/03/2007 02:14 AM Michael M Slusarz slusarz

Bug: 4569
Automatically delete blacklisted messages.

1.56.10.10 FRAMEWORK_3 (+2 -2 lines) 01/02/2007 08:54 AM Jan Schneider jan

Happy New Year

Tags: IMP_4_1_4_RC1

1.72 (+2 -2 lines) 01/02/2007 07:47 AM Jan Schneider jan

Happy New Year

1.71 (+2 -2 lines) 01/01/2007 07:41 PM Jan Schneider jan

Assign copyright to The Horde Project for those copyright holders that already agreed to it.

1.70 (+2 -3 lines) 06/03/2006 01:25 PM Michael M Slusarz slusarz

Various minor tweaks.

1.69 (+6 -2 lines) 06/03/2006 11:55 AM Michael M Slusarz slusarz

Remove 'stream' as a session variable.  it is nothing more than a disguised
global since it doesn't persist between page accesses.
Don't require us to pass the imap stream to several overriden functions since
we can do the necessary stream passing in the overriden functions themselves.

1.68 (+1 -24 lines) 05/25/2006 01:04 AM Michael M Slusarz slusarz

IMP_Filter:: doesn't need a singleton().

1.67 (+3 -3 lines) 03/12/2006 03:14 AM Michael M Slusarz slusarz

standardize my e-mail address

1.56.10.9 FRAMEWORK_3 (+6 -6 lines) 02/04/2006 02:09 PM Michael M Slusarz slusarz

MFH 1.66

Tags: IMP_4_1_3, IMP_4_1_2, IMP_4_1_1, IMP_4_1, IMP_4_1_RC3

1.66 (+6 -6 lines) 02/04/2006 02:05 PM Michael M Slusarz slusarz

fix phpdoc

1.56.10.8 FRAMEWORK_3 (+40 -14 lines) 02/04/2006 02:02 PM Michael M Slusarz slusarz

MFH: Convert IMP_Filter:: to OO access.
IMP_Filter::filter() now supports search folders.

1.65 (+40 -14 lines) 02/04/2006 01:54 PM Michael M Slusarz slusarz

Convert IMP_Filter:: to OO access.
IMP_Filter::filter() now supports search folders.

1.56.10.7 FRAMEWORK_3 (+2 -2 lines) 01/01/2006 04:28 PM Jan Schneider jan

Happy new year

Tags: IMP_4_1_RC2, IMP_4_1_RC1

1.64 (+2 -2 lines) 01/01/2006 04:10 PM Jan Schneider jan

Happy new year\!

1.63 (+5 -9 lines) 11/22/2005 02:29 AM Michael M Slusarz slusarz

use the cached IMP_Headers:: object.

1.56.10.6 FRAMEWORK_3 (+1 -2 lines) 10/18/2005 08:13 AM Jan Schneider jan

Merged from HEAD

1.56.10.5 FRAMEWORK_3 (+1 -7 lines) 07/02/2005 11:42 PM Matt Selsky selsky

MFH: Remove unneeded "@access public".
Wrapping.

Tags: IMP_4_0_5, IMP_4_0_4, IMP_4_0_4_RC2, IMP_4_0_4_RC1

1.62 (+1 -7 lines) 07/02/2005 11:23 PM Matt Selsky selsky

Remove unneeded "@access public".
Wrapping.

Tags: BEFORE_MERGE_3_1

1.56.10.4 FRAMEWORK_3 (+7 -8 lines) 03/25/2005 09:48 AM Chuck Hagenbuch chuck

MFH 1.61

Tags: IMP_4_0_3, IMP_4_0_3_RC1

1.61 (+7 -8 lines) 03/25/2005 09:48 AM Chuck Hagenbuch chuck

No reason to pass these arrays by reference.

1.56.10.3 FRAMEWORK_3 (+24 -13 lines) 03/21/2005 10:38 PM Michael M Slusarz slusarz

MFH: IMP.php - 1.462; Message.php - 1.166; Spam.php - 1.5;
mailbox.php - 2.625, 2.626; message.php - 2.568; Filter.php - 1.60;
CHANGES - 1.764

1.60 (+23 -12 lines) 03/21/2005 10:21 PM Michael M Slusarz slusarz

Fix whitelist/blacklist additions from a search mailbox screen.

1.56.10.2 FRAMEWORK_3 (+3 -3 lines) 03/06/2005 08:00 AM Jan Schneider jan

MFH 1.59

1.59 (+3 -3 lines) 03/06/2005 07:53 AM Jan Schneider jan

Registry::link() doesn't run URLs through Horde::url(), so we need to do this
here to attach session IDs if necessary.

Bug: 1417

1.58 (+2 -3 lines) 01/26/2005 01:29 AM Michael M Slusarz slusarz

Bug: 1162
Don't output success messages here - we need to do this in ingo instead.

1.57 (+3 -3 lines) 01/03/2005 09:34 AM Jan Schneider jan

Happy New Year

1.56.10.1 FRAMEWORK_3 (+3 -3 lines) 01/03/2005 07:25 AM Jan Schneider jan

Happy New Year

Tags: IMP_4_0_2, IMP_4_0_2_RC1, IMP_4_0_1

1.56 (+14 -9 lines) 09/29/2004 01:53 AM Michael M Slusarz slusarz

Don't automatically redirect to black/whitelist page.  Provide link instead.

Tags: FRAMEWORK_3, IMP_4_0, IMP_4_0_RC3, IMP_4_0_RC2, IMP_4_0_RC1, IMP_4_0_BETA

1.55 (+3 -3 lines) 05/20/2004 11:45 AM Jan Schneider jan

Fix package names.

1.54 (+3 -3 lines) 01/01/2004 10:15 AM Jan Schneider jan

Happy new year everyone.

Tags: IMP_4_0_ALPHA

1.53 (+3 -3 lines) 12/17/2003 01:38 PM Michael M Slusarz slusarz

Move classes that extend Horde libraries to subdirectories.

1.52 (+7 -5 lines) 12/04/2003 04:18 PM Michael M Slusarz slusarz

Allow filtering on any mailbox if the backend allows on demand filtering.
Disabled by default.

1.51 (+5 -5 lines) 08/08/2003 06:57 PM Jan Schneider jan

Allow declination.

1.50 (+3 -3 lines) 06/24/2003 03:55 AM Michael M Slusarz slusarz

Don't need this parameter anymore.

1.49 (+3 -3 lines) 06/12/2003 06:37 PM Michael M Slusarz slusarz

IMP::serverString() can now append folder name to output.

1.48 (+6 -4 lines) 06/04/2003 05:50 PM Michael M Slusarz slusarz

Only provide blacklist/whitelist links if available (specifically check
lacklist availability since IMP can no provides an API interface).
Also, no need to check the show[Black|White]list method in mailbox/message -
check in IMP_Filter:: instead.

1.47 (+34 -582 lines) 06/04/2003 05:25 PM Michael M Slusarz slusarz

Bug:
Submitted by:
Merge after:
OK here it is - finally the removal of the actual filtering details from
the IMP code.  I wanted to get this in ASAP simply because there are many
file changes and I may not be around much later this week - thus, I wanted
to commit when I know all these files are up to date. I've been using this
code for about a week and everything I have tried looks ok.

If you haven't configured ingo yet, you should if you want to continue to
use filters as IMP used to provide them. See imp/docs/INSTALL.

If ingo isn't set up yet, this should not be a critical problem - IMP simply
won't filter any mail until it is set up.  For those that want to try
converting their IMP HEAD filters to ingo (and possibly IMP 3.x filters
although I haven't been able to test), try
ingo/scripts/convert_imp_scripts.php. YMMV.

Make sure your horde/config/registry.php is up-to-date also.

There is no longer a 'filter_on_refresh' preference - it has been replaced
by 'filter_on_display' instead.  Once you convert your filters, you no longer
need the 'filters' preference either.

IMP no longer handles filtering - instead, IMP only deals with basic
filter preferences and everything else is handled by Horde API calls.

1.46 (+25 -8 lines) 05/22/2003 02:35 PM Michael M Slusarz slusarz

[mms] IMAP_Search:: now uses a IMAP_Search_Query:: object to build the
actual IMAP search.
There are still optimizations that can be done in the library, but it works
and will make implementing the ingo scripts much easier.

1.45 (+60 -2 lines) 04/07/2003 08:29 PM Michael M Slusarz slusarz

blacklistMessage() and whitelistMessage() fit nicer in IMP_Filter:: than
IMP::.

1.44 (+5 -3 lines) 04/07/2003 08:19 PM Michael M Slusarz slusarz

Need to have access to $imp here.

1.43 (+4 -4 lines) 04/07/2003 08:17 PM Michael M Slusarz slusarz

[mms] Move complex IMAP searching code from IMP_Search:: to IMAP_Search::.
Ingo, for example, will need this functionality (very soon).

1.42 (+4 -4 lines) 04/01/2003 04:15 PM Michael M Slusarz slusarz

Bug: 1215
[mms] Correct display of filter rules with "special" HTML characters.

1.41 (+11 -5 lines) 02/21/2003 07:57 PM Michael M Slusarz slusarz

Add 'Nuke Message' action to filters.

1.40 (+10 -91 lines) 02/11/2003 07:30 PM Michael M Slusarz slusarz

Abstracted out searching code in IMP_Filter:: (moving it to IMP_Search::) so
that the extended header searching could be accessed anywhere, not just
inside the filtering code.  This theoretically should allow AND searches
to work, although the UI still needs to be developed.

1.39 (+4 -4 lines) 01/12/2003 10:43 AM Jan Schneider jan

strtoupper() -> String::upper()

1.38 (+3 -3 lines) 01/06/2003 04:35 AM Jan Schneider jan

Rename String::strtolower() to String::lower() and strtoupper() to upper().

1.37 (+3 -3 lines) 01/05/2003 10:51 PM Michael M Slusarz slusarz

This should be String, not NLS, right Jan?

1.36 (+126 -89 lines) 01/03/2003 03:44 PM Michael M Slusarz slusarz

Abstracted the code in IMP_Filter to allow for various filtering storage
backends.  Currently, only a prefs storage backend (the IMP default) is
available.
Some small performance enhancements to adding blacklist addresses.
array_search() only needs to be checked for false now (as of PHP 4.2.0).

1.35 (+3 -3 lines) 01/02/2003 09:15 PM Jan Schneider jan

Bump year.

1.34 (+5 -5 lines) 12/28/2002 12:53 PM Jan Schneider jan

Use NLS::strtolower() where appropriate.

1.33 (+5 -3 lines) 12/27/2002 03:44 PM Michael M Slusarz slusarz

Convert IMP_Folder into an OO-interface. This lets us get rid of the
static variables in various functions (yuck).

1.32 (+3 -3 lines) 12/26/2002 05:47 PM Michael M Slusarz slusarz

Tweaks to storage of filters.

1.31 (+3 -36 lines) 12/26/2002 05:44 PM Michael M Slusarz slusarz

Add upgrading documentation (at least a start).
Filter upgrade code has been moved to scripts/convert_filters.php.

1.30 (+2 -33 lines) 10/15/2002 12:11 PM Chuck Hagenbuch chuck

Convert blacklist to a registry call, and add the methods for IMP to
handle it if another app doesn't override mail/blacklistFrom and
mail/showBlacklist.

1.29 (+8 -2 lines) 10/01/2002 06:52 AM Jan Schneider jan

Treat "@domain.tld" correctly as host-only blacklist.

1.28 (+6 -4 lines) 09/21/2002 07:06 AM Jan Schneider jan

Notify about email addresses that have been blacklisted.

1.27 (+8 -9 lines) 09/03/2002 11:06 AM Chuck Hagenbuch chuck

style

1.26 (+3 -13 lines) 08/19/2002 05:51 PM Michael M Slusarz slusarz

Brainfart - when registering a shutdown function it makes a whole hell of a
lot of sense to use a _pointer_ to the object/class instead of a _copy_
of the object/class - obviously, when using a copy, it will only see changes
that took place to data up to the point of registering the shutdown
function.

1.25 (+4 -6 lines) 08/14/2002 11:38 PM Chuck Hagenbuch chuck

Object style.

1.24 (+4 -4 lines) 08/14/2002 05:45 PM Michael M Slusarz slusarz

More IMP_Message->IMP_Mailbox stuff. If anyone knows a better way to have
an optional "pass by reference" parameter rather than what I have done
(simply silence the warnings with "@" e.g. "@new IMP_Message"), let me know...

1.23 (+17 -14 lines) 08/06/2002 05:57 PM Michael M Slusarz slusarz

Fix register_shutdown_function() activity.

1.22 (+19 -13 lines) 08/03/2002 10:19 PM Michael M Slusarz slusarz

Better (and fully working) conversion method.

1.21 (+25 -17 lines) 08/02/2002 04:42 PM Michael M Slusarz slusarz

PHP's implementation of imap_search() won't let you use 'OR'?  Are you
kidding me?  That _really_ stinks.  We have to go back to the old way -
searching *every* field with a separate imap_search() call.  ugh.
If I knew C I would fix PHP.  But I don't so I should stop whining.

1.20 (+273 -149 lines) 08/02/2002 03:39 PM Michael M Slusarz slusarz

IMP_Filter framework now uses a new data structure - this new structure
allows for the creation and storage of "AND" filters (although the query
code needed for this has not been implemented yet).
Blacklists are now stored separately.  This is a more efficient during loading,
allows us to search for _all_ blacklist addresses in a _single_ imap
query (instead of a separate query for each address before), and ensures that
blacklist filters will always be applied before other filters.
TODO: implement UI for adding "AND" rules; implement code to correctly
formulate "AND" queries for the IMAP server.

1.19 (+14 -4 lines) 08/01/2002 12:45 PM Michael M Slusarz slusarz

* Fix "OR" searches using imap_search().
* Return empty_array if $match_indices is empty (no search results).

1.18 (+140 -78 lines) 07/31/2002 03:29 PM Michael M Slusarz slusarz

* Private variable naming.
* Much improved logic to determine matched messages.  Each filter requires
  only a single IMAP search call (as opposed to a separate call for each
  field in a filter before).  Additionally, header information for
  "non-standard" headers are cached so that the header information does not
  need to be rebuilt for every field.

1.17 (+9 -2 lines) 07/30/2002 06:32 PM Michael M Slusarz slusarz

Added GPL information to lib files.  Also, phpdoc fixes in various places.

1.16 (+2 -3 lines) 07/23/2002 02:24 PM Michael M Slusarz slusarz

Oops.

1.15 (+12 -10 lines) 07/23/2002 01:21 PM Michael M Slusarz slusarz

Silence warning.

1.14 (+19 -4 lines) 07/19/2002 04:06 PM Michael M Slusarz slusarz

First stab at filtering by any header - any pointers on how this can be
made cleaner would be gladly appreciated (in short, we can't use the TEXT
search command since it doesn't search Header _names_; the HEADER search
command is not implemented by all IMAP servers).

1.13 (+5 -2 lines) 07/19/2002 03:16 PM Michael M Slusarz slusarz

Updates to the filter management page.  Now allows any header to be filtered
(even though the actual filtering code is not written yet - so DON'T expect
anything to work as of right now.)  Since there are various other display,
dos->unix CRLF, and javascript fixes, I wanted to get this commited even
without all the functionality.

1.12 (+17 -2 lines) 07/19/2002 01:48 PM Michael M Slusarz slusarz

We _must_ call prefs->store() here since the prefs shutdown function will
have most likely already run before we get here.

1.11 (+2 -3 lines) 07/18/2002 02:49 PM Michael M Slusarz slusarz

Prefs:: transparently saves all "dirty" prefs entries to our storage
backend for us now.

1.10 (+23 -23 lines) 07/11/2002 12:43 PM Michael M Slusarz slusarz

Don't show blacklist entries in filter rules.
Improved saving of blacklist entries.
getBlacklist() now always returns the filter index as the key.

1.9 (+3 -2 lines) 07/10/2002 06:20 PM Michael M Slusarz slusarz

Make sure only one shutdown function is registered.

1.8 (+4 -2 lines) 07/09/2002 03:06 PM Chuck Hagenbuch chuck

make sure MIME.php is loaded before we use it.

1.7 (+7 -2 lines) 07/09/2002 12:16 PM Michael M Slusarz slusarz

moveFilter() returns boolean result.

1.6 (+5 -4 lines) 07/07/2002 06:46 PM Chuck Hagenbuch chuck

"do" in method names is nearly always redundant.

1.5 (+4 -4 lines) 07/05/2002 06:02 PM Chuck Hagenbuch chuck

arg order, missing $this->

1.4 (+14 -9 lines) 07/05/2002 05:54 PM Michael M Slusarz slusarz

Bugfixes and cleanups.

1.3 (+307 -36 lines) 07/05/2002 05:36 PM Michael M Slusarz slusarz

Use IMP_Filter:: for all filtering activities.

1.2 (+49 -2 lines) 07/01/2002 11:51 PM Michael M Slusarz slusarz

Moved more filtering stuff to IMP_Filter::.

1.1 07/01/2002 06:46 PM Michael M Slusarz slusarz

* Added an IMP_Filter:: class.
* Use Horde::addParameter() to build URLs.
* style