|
@@ -338,7 +338,7 @@ function user_strcasecmp($a, $b) {
|
|
* See comment on sqimap_mailbox_parse() for info about the returned array.
|
|
* See comment on sqimap_mailbox_parse() for info about the returned array.
|
|
*/
|
|
*/
|
|
function sqimap_mailbox_list($imap_stream) {
|
|
function sqimap_mailbox_list($imap_stream) {
|
|
- global $boxesnew;
|
|
|
|
|
|
+ global $boxesnew, $default_folder_prefix;
|
|
|
|
|
|
if ( !isset( $boxesnew ) ) {
|
|
if ( !isset( $boxesnew ) ) {
|
|
|
|
|
|
@@ -460,7 +460,6 @@ function sqimap_mailbox_list($imap_stream) {
|
|
$used[$k] = false;
|
|
$used[$k] = false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
/* List special folders and their subfolders, if requested. */
|
|
/* List special folders and their subfolders, if requested. */
|
|
if ($list_special_folders_first) {
|
|
if ($list_special_folders_first) {
|
|
foreach ( $boxesall as $k => $box ) {
|
|
foreach ( $boxesall as $k => $box ) {
|
|
@@ -468,6 +467,10 @@ function sqimap_mailbox_list($imap_stream) {
|
|
$boxesnew[] = $box;
|
|
$boxesnew[] = $box;
|
|
$used[$k] = true;
|
|
$used[$k] = true;
|
|
}
|
|
}
|
|
|
|
+ if (!$used[$k] && preg_match("/$default_folder_prefix(Sent|Drafts|Trash)/", $box['unformatted']) ) {
|
|
|
|
+ $boxesnew[] = $box;
|
|
|
|
+ $used[$k] = true;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -479,7 +482,6 @@ function sqimap_mailbox_list($imap_stream) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
return $boxesnew;
|
|
return $boxesnew;
|
|
}
|
|
}
|
|
|
|
|