Oops -- I realized I had a bug in the imap server type detection! So, here's an updated patch. Sorry for the mixup -- ignore the patch in the previous mail.

Michael Huttinger
Software Engineer

---------------------- PATCH ----------------
diff -Naur squirrelmail_orig/functions/imap_mailbox.php squirrelmail/functions/imap_mailbox.php
--- squirrelmail_orig/functions/imap_mailbox.php 2003-11-19 12:51:09.000000000 -0600
+++ squirrelmail/functions/imap_mailbox.php 2003-11-19 13:10:17.000000000 -0600
@@ -430,7 +430,14 @@
$boxes = sqimap_mailbox_list($imap_stream);
}
foreach ($boxes as $boxes_part) {
- if (!in_array('noselect', $boxes_part['flags'])) {
+
+ if($imap_server_type = 'dovecot')
+ $flg = in_array('children',$boxes_part['flags']) ||
+ !in_array('noselect', $boxes_part['flags']);
+ else
+ $flg = !in_array('noselect', $boxes_part['flags']);
+
+ if($flg) {
$box = $boxes_part['unformatted'];
$lowerbox = strtolower($box);


@@ -467,7 +474,7 @@
        global $data_dir, $username, $list_special_folders_first,
               $folder_prefix, $trash_folder, $sent_folder, $draft_folder,
               $move_to_trash, $move_to_sent, $save_as_draft,
-               $delimiter, $noselect_fix_enable;
+               $delimiter, $noselect_fix_enable, $imap_server_type;

$inbox_in_list = false;
$inbox_subscribed = false;
@@ -498,7 +505,10 @@
}
}
$temp_mailbox_name = find_mailbox_name($lsub_ary[$i]);
- $sorted_lsub_ary[] = $temp_mailbox_name;
+ if(substr($temp_mailbox_name,-1) != $delimiter ||
+ $imap_server_type != 'dovecot') {
+ $sorted_lsub_ary[] = $temp_mailbox_name;
+ }
if (!$inbox_subscribed && strtoupper($temp_mailbox_name) == 'INBOX') {
$inbox_subscribed = true;
}





------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ -- squirrelmail-users mailing list List Address: [EMAIL PROTECTED] List Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=2995 List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

Reply via email to