#23377 [Opn]: imap_thread has hard-coded search param
| From: | bill dot mccoy at pictureiq dot com | Date: | Mon, 28 Apr 2003 14:59:40 +0000 |
| Subject: | #23377 [Opn]: imap_thread has hard-coded search param | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-38584@lists.php.net to get a copy of this message | ||
ID: 23377
User updated by: bill dot mccoy at pictureiq dot com
Reported By: bill dot mccoy at pictureiq dot com
Status: Open
-Bug Type: Feature/Change Request
+Bug Type: IMAP related
Operating System: Linux, WinXP
PHP Version: 4.3.1
New Comment:
Well, yes, the code is operating as intended by the designer - but this
begs the question of *why* it was intended to hide the search
functionality defined in the IMAP specification behind a hard-coded
"ALL". If there's no good reason for this unfriendly and
counter-to-the-specification behavior then I think it's a defect, not a
feature request. Put it another way: the raison d'etre of the PHP IMAP
API is to expose the IMAP interface to PHP client programming and
presently imap_thread does not do so properly, and for no apparent good
reason. Therefore bug. If on the other hand there's a good reason for
this behavior then by all means say so and mark it a feature request.
Previous Comments:
------------------------------------------------------------------------
[2003-04-28 01:19:46] derick@php.net
Marking this as a feature request, as it's not really a bug (it was
intended this way).
Derick
------------------------------------------------------------------------
[2003-04-28 00:01:08] bill dot mccoy at pictureiq dot com
imap_thread's implementation in php_imap.c passes the hard-coded string
"ALL" to the underlying IMAP C Runtime Library. This renders the
function almost useless in situations where very large mailboxes
require filtering (e.g. with a "SINCE DATE" search string). And even if
imap_thread is only to support REFERENCE threading, the IMAP extension
spec explicitly defines that the THREAD is performed on the results of
the contained SEARCH. So in some sense failing to enable this means
imap_thread can't be used in compliance with the spec. It is also
inconsistent with imap_sort. Making 'criteria' a param for imap_thread
as with imap_search & imap_sort would be (it seems to me) a tiny change
with good bang for the buck. For compatibility I guess making it an
optional 3rd param would be desirable.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23377&edit=1