git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2607
7612ce4b-ef26-0410-bec9-
ea0150e637f0
* See comment on sqimap_mailbox_parse() for info about the returned array.
*/
function sqimap_mailbox_list($imap_stream) {
- global $boxesnew;
+ global $boxesnew, $default_folder_prefix;
if ( !isset( $boxesnew ) ) {
$used[$k] = false;
}
}
-
/* List special folders and their subfolders, if requested. */
if ($list_special_folders_first) {
foreach ( $boxesall as $k => $box ) {
$boxesnew[] = $box;
$used[$k] = true;
}
+ if (!$used[$k] && preg_match("/$default_folder_prefix(Sent|Drafts|Trash)/", $box['unformatted']) ) {
+ $boxesnew[] = $box;
+ $used[$k] = true;
+ }
}
}
}
}
}
-
return $boxesnew;
}