Summary | No Messages error caused by empty direction in sortpref |
Queue | IMP |
Queue Version | 4.3.11 |
Type | Bug |
State | Not A Bug |
Priority | 2. Medium |
Owners | |
Requester | Juergen.Obermann (at) hrz (dot) uni-giessen (dot) de |
Created | 03/23/2012 (4849 days ago) |
Due | |
Updated | 03/26/2012 (4846 days ago) |
Assigned | |
Resolved | 03/26/2012 (4846 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
But anyway here is my fix for this non bug:
*** ./imp/lib/IMP.php.dist Fri Feb 10 22:58:57 2012
--- ./imp/lib/IMP.php Fri Mar 23 13:20:38 2012
***************
*** 1532,1537 ****
--- 1532,1542 ----
'limit' => false
);
+ /* check for empty direction */
+ if ($ob['dir'] === "") {
+ $ob['dir'] = $GLOBALS['prefs']->getValue('sortdir');
+ }
+
/* Can't do threaded searches in search mailboxes. */
if (!IMP::threadSortAvailable($mbox)) {
if ($ob['by'] == SORTTHREAD) {
State ⇒ Not A Bug
Priority ⇒ 2. Medium
Patch ⇒ No
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ No Messages error caused by empty direction in sortpref
Type ⇒ Bug
State ⇒ Unconfirmed
direction set to "" (an empty string), like that:
userxy imp sortpref
a:1:{s:5:"INBOX";a:2:{s:1:"b";s:1:"2";s:1:"d";s:0:"";}}
In this case the user gets the message 'There are no messages in this
mailbox.' in the inbox screen, even if the inbox contains seen or
unseen messages. The virtual inbox shows the unseen messages, and
after reading them they dissapear from the inbox. The user can not set
the sorting for his inbox to correct this problem himself, because the
title bar is not shown for an empty folder. Also setting the global
sorting options does not help as long as the wrong sortpref entry for
the mailbox exists. This is a serious deadlock situation. Only an
database administrator can delete the database entry of correct it by
setting the value "0" or "1" for the sorting direction e.g.
userxy imp sortpref
a:1:{s:5:"INBOX";a:2:{s:1:"b";s:1:"2";s:1:"d";s:1:"0";}}