[Tickets #8922] Sort messages by arrival date not working correctly
bugs at horde.org
bugs at horde.org
Fri Mar 19 12:06:41 UTC 2010
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/8922
------------------------------------------------------------------------------
Ticket | 8922
Created By | Valentin.Vidic at CARNet.hr
Summary | Sort messages by arrival date not working correctly
Queue | IMP
Version | 4.3.6
Type | Bug
State | Unconfirmed
Priority | 2. Medium
Milestone |
Patch |
Owners |
------------------------------------------------------------------------------
Valentin.Vidic at CARNet.hr (2010-03-19 08:06) wrote:
It seems that IMP assumes that sorting the messages by UID is the same
as sorting them by arrival date. But this is not always the case. For
example if I copy an old message to an IMAP folder it will get a new
high UID but the arrival date stays in the past and should be sorted
accordingly. Disabling the special handling of SORTARRIVAL
($imap_cache->getMailboxArrival) in imp/lib/Mailbox.php seems to solve
the issue. Now IMP issues "UID SORT (ARRIVAL)" or "UID SORT (REVERSE
ARRIVAL)" and messages appear properly sorted. Or perhaps the messages
should be sorted by arrival date before putting them into the _arrival
cache? There relevant part of the code:
if (false && $sortpref['by'] == SORTARRIVAL) {
require_once IMP_BASE . '/lib/IMAP/Cache.php';
$imap_cache = &IMP_IMAP_Cache::singleton();
$this->_sorted =
$imap_cache->getMailboxArrival($this->_mailbox);
if ($sortpref['dir']) {
$this->_sorted = array_reverse($this->_sorted);
}
} else {
$this->_sorted =
$imap_search->searchSortMailbox($query, null, $this->_mailbox,
$sortpref['by'], $sortpref['dir']);
}
More information about the bugs
mailing list