From 18a148f06418dfa42906f2df091015476b6694bb Mon Sep 17 00:00:00 2001 From: lkehresman Date: Wed, 31 Jan 2001 17:19:18 +0000 Subject: [PATCH] updated changelog, fixed folder subscriptions not displaying problem git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1006 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- ChangeLog | 5 +++++ functions/imap_mailbox.php | 19 +++++++++++-------- functions/imap_search.php | 4 +++- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6ce12351..d215d26c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ Version 1.0.1 -- DEVELOPMENT ---------------------------- +- Fixed problems with sending messages +- Fixed some pass-by-reference calls that caused problems with newer PHP versions +- Fixed bug that crashed some web servers +- Fixed bug that didn't display last folder subscribed to +- Removed requirement of PHP 4.0.1 for array_unique() function - Removed unnecessary echo statements by breaking out of PHP - Changed evaluation method from using " to ' for speed improvements - If no plugin array set in config.php, now handled correctly diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index e2c843dd..cec646e1 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -111,7 +111,7 @@ ** formatted - nicely formatted folder name ** unformatted - unformatted, but with delimiter at end removed ** unformatted-dm - folder name as it appears in raw response - ** unformatted-disp - unformatted without $folder_prefix + ** unformatted-disp - unformatted without $folder_prefix ** ******************************************************************************/ function sqimap_mailbox_parse ($line, $line_lsub, $dm) { @@ -134,7 +134,7 @@ $boxesbyname[$mailbox] = $g; $parentfolder = readMailboxParent($mailbox, $dm); if((eregi("^inbox".quotemeta($dm), $mailbox)) || - (ereg("^".$folder_prefix, $mailbox)) || + (ereg("^".$folder_prefix, $mailbox)) || ( isset($boxesbyname[$parentfolder]) && (strlen($parentfolder) > 0) ) ) { $indent = $dm_count - (countCharInString($folder_prefix, $dm)); if ($indent) @@ -198,8 +198,11 @@ fputs ($imap_stream, "a001 LSUB \"\" \"*\"\r\n"); $lsub_ary = sqimap_read_data ($imap_stream, "a001", true, $response, $message); - /** OS: we don't want to parse last element of array, 'cause it is OK command, so we unset it **/ - unset($lsub_ary[count($lsub_ary)-1]); + /** OS: we don't want to parse last element of array, 'cause it is OK command, so we unset it **/ + /** LUKE: This introduced errors.. do a check first **/ + if (substr($lsub_ary[count($lsub_ary)-1], 0, 4) == "* OK") { + unset($lsub_ary[count($lsub_ary)-1]); + } for ($i=0;$i < count($lsub_ary); $i++) { $sorted_lsub_ary[$i] = find_mailbox_name($lsub_ary[$i]); @@ -265,14 +268,14 @@ // Then list special folders and their subfolders for ($i = 0 ; $i < count($boxes) ; $i++) { if ($move_to_trash && - eregi("^" . quotemeta($trash_folder) . "(" . - quotemeta($dm) . ".*)?$", $boxes[$i]["unformatted"])) { + eregi("^" . quotemeta($trash_folder) . "(" . + quotemeta($dm) . ".*)?$", $boxes[$i]["unformatted"])) { $boxesnew[] = $boxes[$i]; $used[$i] = true; } elseif ($move_to_sent && - eregi("^" . quotemeta($sent_folder) . "(" . - quotemeta($dm) . ".*)?$", $boxes[$i]["unformatted"])) { + eregi("^" . quotemeta($sent_folder) . "(" . + quotemeta($dm) . ".*)?$", $boxes[$i]["unformatted"])) { $boxesnew[] = $boxes[$i]; $used[$i] = true; } diff --git a/functions/imap_search.php b/functions/imap_search.php index de6bf6d8..a9cda066 100644 --- a/functions/imap_search.php +++ b/functions/imap_search.php @@ -39,8 +39,10 @@ function sqimap_search($imapConnection,$search_where,$search_what,$mailbox,$colo #Check to see if a SEARCH Responce was recived if (substr($readin[$c],0,9) == "* SEARCH ") $messagelist = explode(" ",substr($readin[$c],9)); - else + else if (isset($errors)) $errors = $errors.$readin[$c]; + else + $errors = $readin[$c]; $c++; } -- 2.25.1