6.0.0-git
2019-03-20

[#11100] No Messages error caused by empty direction in sortpref
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 2012-03-23 (2553 days ago)
Due
Updated 2012-03-26 (2550 days ago)
Assigned
Resolved 2012-03-26 (2550 days ago)
Milestone
Patch No

History
2012-03-26 19:18:43 Juergen (dot) Obermann (at) hrz (dot) uni-giessen (dot) de Comment #3 Reply to this comment
Nice to hear it is no bug because the version is no longer supported. 
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) {



2012-03-26 03:17:42 Michael Slusarz Comment #2
State ⇒ Not A Bug
Reply to this comment
IMP 4 is no longer supported.

2012-03-23 11:21:05 Juergen (dot) Obermann (at) hrz (dot) uni-giessen (dot) de Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Summary ⇒ No Messages error caused by empty direction in sortpref
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
Reply to this comment
In the database table horde_prefs appear entries with sorting 
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";}}

Saved Queries