|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-11-19 18:01 UTC] sniper@php.net
[2001-12-13 06:29 UTC] sander@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 05:00:01 2025 UTC |
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