diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-08-18 17:40:07 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-08-18 17:40:07 +0000 |
| commit | 5e02e071f4ebe22ddea2da0ff955df02a1ce6772 (patch) | |
| tree | 85d716655162fc699bfd28df3f9475eaa2ddfd76 /roundcubemail/program/include | |
| parent | 9386ff70d94cb4ed78da62b769ce52c48abf482e (diff) | |
Fix folders drop-down list: descend into root folder (e.g. INBOX) even if part of the exception list
git-svn-id: https://svn.roundcube.net/trunk@5089 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
| -rw-r--r-- | roundcubemail/program/include/main.inc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc index a3edbf7ca..82d3eb7e9 100644 --- a/roundcubemail/program/include/main.inc +++ b/roundcubemail/program/include/main.inc @@ -1407,21 +1407,21 @@ function rcmail_render_folder_tree_select(&$arrFolders, &$mbox_name, $maxlength, $out = ''; foreach ($arrFolders as $key => $folder) { - if (!empty($exceptions) && in_array($folder['id'], $exceptions)) { - continue; - } + if (empty($exceptions) || !in_array($folder['id'], $exceptions)) { + if (!$realnames && ($folder_class = rcmail_folder_classname($folder['id']))) + $foldername = rcube_label($folder_class); + else { + $foldername = $folder['name']; - if (!$realnames && ($folder_class = rcmail_folder_classname($folder['id']))) - $foldername = rcube_label($folder_class); - else { - $foldername = $folder['name']; + // shorten the folder name to a given length + if ($maxlength && $maxlength>1) + $foldername = abbreviate_string($foldername, $maxlength); + } - // shorten the folder name to a given length - if ($maxlength && $maxlength>1) - $foldername = abbreviate_string($foldername, $maxlength); + $select->add(str_repeat(' ', $nestLevel*4) . $foldername, $folder['id']); } - - $select->add(str_repeat(' ', $nestLevel*4) . $foldername, $folder['id']); + else if ($nestLevel) + continue; if (!empty($folder['folders'])) $out .= rcmail_render_folder_tree_select($folder['folders'], $mbox_name, $maxlength, |
