[dev] navigator question

Anil Madhavapeddy anil@recoil.org
Tue, 31 Oct 2000 00:27:43 +00000 (GMT)


Quoting Chuck Hagenbuch <chuck@horde.org>:
> 
> Yes, the same thing happens with UW when you have folders set to mail/ or
> similar - we should make sure that the INBOX is always the first node in the
> tree.
> 

The suspiciously simple patch below works for Courier (and probably Cyrus),
since it just steps back a level (sets the initial box to INBOX, and the
next-level to the prefix folders).  I'll hold on committing it till I
try it out with UW.

Debian's installing on my laptop atm, so I can try it out there 
with a bit of apt-get magic tommorrow morning if your server is 
still dodgy.

PS: Im assuming it is safe to hardcode INBOX, since 
IMP_folder::flist() treats it as a special, hardcoded case also.

Index: tree.php
===================================================================
RCS file: /cvs/horde/imp/lib/tree.php,v
retrieving revision 1.18
diff -u -r1.18 tree.php
--- tree.php    2000/10/30 21:34:36     1.18
+++ tree.php    2000/10/31 00:21:22
@@ -153,8 +153,8 @@
         // hack for usort to work
         global $delimiter;
         $delimiter = $this->delimiter;
-        $boxes = $this->getList("$prefix%");
-        $nextlevel = $this->getList("$prefix%$this->delimiter%");
+        $boxes = $this->getList('INBOX');
+        $nextlevel = $this->getList("$prefix%");

         if ($boxes) {
             $this->feedList($boxes);

--
Anil Madhavapeddy, <anil@recoil.org>