From: jmunro Date: Tue, 19 Mar 2002 22:23:48 +0000 (+0000) Subject: tweaking special folder sub folder fix X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=a8725d932a7c1c27f4fd88cc337d851171aece3f tweaking special folder sub folder fix git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2609 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index 351993c9..90ef906d 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -338,7 +338,7 @@ function user_strcasecmp($a, $b) { * See comment on sqimap_mailbox_parse() for info about the returned array. */ function sqimap_mailbox_list($imap_stream) { - global $boxesnew, $default_folder_prefix; + global $boxesnew, $default_folder_prefix, $optional_delimiter; if ( !isset( $boxesnew ) ) { @@ -467,14 +467,15 @@ function sqimap_mailbox_list($imap_stream) { $boxesnew[] = $box; $used[$k] = true; } - if (!$used[$k] && preg_match("/$default_folder_prefix(Sent|Drafts|Trash)/", $box['unformatted']) ) { + $spec_sub = $box['formatted']; + $spec_sub = str_replace(" ", "", $box['formatted']); + if (!$used[$k] && preg_match("/^$default_folder_prefix(Sent|Drafts|Trash).{1}$spec_sub$/", $box['unformatted']) ) { $boxesnew[] = $box; $used[$k] = true; } } } - /* Rest of the folders */ foreach ( $boxesall as $k => $box ) { if ( !$used[$k] ) {