From: [EMAIL PROTECTED]
Operating system: Linux 2.4.10 (rH7.1)
PHP version: 4.0.5
PHP Bug Type: IMAP related
Bug description: imap_sort returns irregular sort sequence
Hello folks...
Imap sort works only with small mailbox...
<--- snip --->
$newstrm = imap_open ($ms.$selectedmb, $usr, $usrpwd) or die ("cant
connect: ".imap_last_error());
switch ($sortby) {
case "date":
$sorted_headers = imap_sort($newstrm,SORTDATE, $rev_flag,'');
break;
case "subject":
$sorted_headers = imap_sort($newstrm,SORTSUBJECT, $rev_flag,'');
break;
case "tag":
if ($tag == "From") {
$sorted_headers = imap_sort($newstrm,SORTFROM, $rev_flag,'');
} else {
$sorted_headers = imap_sort($newstrm,SORTTO, $rev_flag,'');
}
break;
case "size":
$sorted_headers = imap_sort($newstrm,SORTSIZE, $rev_flag,'');
break;
}
while (list(,$qq) = each($sorted_headers)) {
$header = imap_headerinfo($newstrm, $qq);
....>>> etc
<--- snip --->
the sort sequence returned by imap_sort is incorrect for any mailbox where
there is more than 10 emails in the mailbox, and especially if there is a
mix of "R" and "U" type of unread.
The function appears to sort partly by new, and then old, and then
both...
<========== php compiled with ========
'./configure' '--with-mysql=/usr/local/mysql' '--with-xml'
'--with-apache=../apache_1.3.19/' '--with-imap=/usr/local/imap'
'--enable-track-vars'
<======== imap specs ===========
compiled from :
imap-2001.BETA.SNAP-0106191041.tar
<========= hardware ============>
intel Pentium 4 1.3 Ghz
640 meG ram
400MHZ BUS MOTHERBOARD
--
Edit bug report at: http://bugs.php.net/?id=14101&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]