From 3d1560e73e22561e168cea67804a037b612396a7 Mon Sep 17 00:00:00 2001 From: jmunro Date: Tue, 19 Mar 2002 23:33:56 +0000 Subject: [PATCH] fixed a problem with preg_match when mailbox delimiter is "/" git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2611 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_mailbox.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index fe275a1e..f98b0131 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -468,7 +468,12 @@ function sqimap_mailbox_list($imap_stream) { $used[$k] = true; } $spec_sub = str_replace(' ', '', $box['formatted']); - if (!$used[$k] && preg_match("/^$default_folder_prefix(Sent|Drafts|Trash).{1}$spec_sub$/", $box['unformatted']) ) { + + /* In case of problems with preg + here is a ereg version + if (!$used[$k] && ereg("^$default_folder_prefix(Sent|Drafts|Trash).{1}$spec_sub$", $box['unformatted']) ) { */ + + if (!$used[$k] && preg_match("?^$default_folder_prefix(Sent|Drafts|Trash).{1}$spec_sub$?", $box['unformatted']) ) { $boxesnew[] = $box; $used[$k] = true; } -- 2.25.1