Req #23377 [Opn->Csd]: imap_thread has hard-coded search param

From: Date: Tue, 24 Oct 2017 01:58:32 +0000
Subject: Req #23377 [Opn->Csd]: imap_thread has hard-coded search param
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-211876@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=23377&edit=1 ID: 23377 Updated by: kalle@php.net Reported by: bill dot mccoy at pictureiq dot com Summary: imap_thread has hard-coded search param -Status: Open +Status: Closed Type: Feature/Change Request Package: IMAP related Operating System: * PHP Version: * -Assigned To: +Assigned To: kalle Block user comment: N Private report: N New Comment: If this is still a request for PHP7 today, then please re-open a new report or possible PR on Github, thanks! Previous Comments: ------------------------------------------------------------------------ [2003-06-04 16:38:51] ben at NOSPAM dot fcpl dot com Couldn't agree more. This should be considered a bug rather than a feature request as the usefulness of the function is seriously impared without it. ------------------------------------------------------------------------ [2003-04-28 09:59:39] bill dot mccoy at pictureiq dot com 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. ------------------------------------------------------------------------ [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 https://bugs.php.net/bug.php?id=23377&edit=1

« previous php.bugs (#211876) next »