diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-03-18 13:02:18 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-03-18 13:02:18 +0000 |
| commit | d51db7c83385535deec9d25e8c428f9337159b99 (patch) | |
| tree | 0b6433f9c18d5e915cf61cc08c21c8cfd0b25574 /roundcubemail/program/lib | |
| parent | c91cf56118eb5832029d9e4dd05a9586c0d35b43 (diff) | |
- Improved performance of folders operations (#1486525) + code cleanups
git-svn-id: https://svn.roundcube.net/trunk@3379 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/lib')
| -rw-r--r-- | roundcubemail/program/lib/imap.inc | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/roundcubemail/program/lib/imap.inc b/roundcubemail/program/lib/imap.inc index 48363bec9..d77a226d8 100644 --- a/roundcubemail/program/lib/imap.inc +++ b/roundcubemail/program/lib/imap.inc @@ -1748,9 +1748,6 @@ function iil_C_GetHierarchyDelimiter(&$conn) { } function iil_C_ListMailboxes(&$conn, $ref, $mailbox) { - global $IGNORE_FOLDERS; - - $ignore = $IGNORE_FOLDERS[strtolower($conn->host)]; $fp = $conn->fp; @@ -1779,12 +1776,7 @@ function iil_C_ListMailboxes(&$conn, $ref, $mailbox) { // split one line $a = iil_ExplodeQuotedString(' ', $line); // last string is folder name - $folder = preg_replace(array('/^"/', '/"$/'), '', iil_UnEscape($a[count($a)-1])); - - if (empty($ignore) || (!empty($ignore) - && !preg_match('/'.preg_quote(ignore, '/').'/i', $folder))) { - $folders[$i] = $folder; - } + $folders[$i] = preg_replace(array('/^"/', '/"$/'), '', iil_UnEscape($a[count($a)-1])); // second from last is delimiter $delim = trim($a[count($a)-2], '"'); @@ -1812,9 +1804,6 @@ function iil_C_ListMailboxes(&$conn, $ref, $mailbox) { } function iil_C_ListSubscribed(&$conn, $ref, $mailbox) { - global $IGNORE_FOLDERS; - - $ignore = $IGNORE_FOLDERS[strtolower($conn->host)]; $fp = $conn->fp; if (empty($mailbox)) { @@ -1846,9 +1835,9 @@ function iil_C_ListSubscribed(&$conn, $ref, $mailbox) { $a = iil_ExplodeQuotedString(' ', $line); // last string is folder name $folder = preg_replace(array('/^"/', '/"$/'), '', iil_UnEscape($a[count($a)-1])); - - if ((!in_array($folder, $folders)) && (empty($ignore) - || (!empty($ignore) && !preg_match('/'.preg_quote(ignore, '/').'/i', $folder)))) { + + // @TODO: do we need this check??? + if (!in_array($folder, $folders)) { $folders[$i] = $folder; } |
