[Tickets] New ticket (199): Missing folders with servers that don't uppercase 'INBOX'

bugs at bugs.horde.org bugs at bugs.horde.org
Thu May 20 01:11:49 PDT 2004


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

-Ticket 199
-Queue: IMP
-Created By: 

-Summary:
Missing folders with servers that don't uppercase 'INBOX'

Comment by imp at oak-wood.co.uk on Thu May 20 01:11:48 2004 (today):
The view of folders in folders.php on servers returning 'Inbox' does not
include any that are alphabetically before 'Inbox'.

IMP_Tree::_init() creates an INBOX if none exists. However, the name of this
will be set to 'Inbox'. Consequently, the value of IMP_Tree->_first is set
to 'Inbox' so that when IMP_Tree::reset() is called it moves to 'Inbox', not
'INBOX'. 

Since RFC3501 is specific about INBOX being case insensitive, IMP_Tree and
IMAP_Tree need to handle the used of mixed case in this folder name.

This kludge for IMP_Tree gets all the folders showing:

--- Tree.php.orig       Fri May 14 21:03:07 2004
+++ Tree.php    Fri May 14 22:54:49 2004
@@ -72,6 +72,7 @@

         if (!isset($boxes['INBOX'])) {
             $boxes['INBOX'] = $this->_getMailbox('INBOX');
+            $boxes['INBOX']->name = 'INBOX';
         }

         /* Do a sort to make sure that 'INBOX' always appears as the first

However, this shows both an INBOX at the top of the tree and an Inbox
arranged alphabetically. Although both contain the same messages, only Inbox
contains sub-folders.

I did try to patch IMAP_Tree::_getList with this to canonicise to upper
case:

--- Tree.php.orig       Sun May 16 19:18:41 2004
+++ Tree.php    Thu May 20 09:07:00 2004
@@ -341,6 +341,9 @@

                     /* Strip off server string. */
                     $box = $this->_removeServerString($box);
+                    if (strtoupper($box->name) == 'INBOX' ) {
+                      $box->name = 'INBOX';
+                    }
                     $unique[$box->name] = $box;
                 }
             }

but this resulted in none of the folders beneath INBOX in the hierarchy
showing. 

--


http://bugs.horde.org/details.php?id=199

-- 


More information about the bugs mailing list