fixed a problem with preg_match when mailbox delimiter is "/"
authorjmunro <jmunro@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 19 Mar 2002 23:33:56 +0000 (23:33 +0000)
committerjmunro <jmunro@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 19 Mar 2002 23:33:56 +0000 (23:33 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2611 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_mailbox.php

index fe275a1ecedbe35188c965d8c795a70f1908642f..f98b0131198ee5fa43bc08a4612d6b37f9b5faf9 100755 (executable)
@@ -468,7 +468,12 @@ function sqimap_mailbox_list($imap_stream) {
                     $used[$k] = true;
                 }
                 $spec_sub = str_replace('&nbsp;', '', $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;
                 }