summaryrefslogtreecommitdiff
path: root/program/include/main.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2011-08-18 17:40:07 +0000
committerthomascube <thomas@roundcube.net>2011-08-18 17:40:07 +0000
commitfbe54043cf598b19a753dc2b21a7ed558d23fd15 (patch)
tree84600000dc5b5a604f6d3dcfe989f4801f998b58 /program/include/main.inc
parent27eb279b0fd495e4719bc154cfa1417004a8f007 (diff)
Fix folders drop-down list: descend into root folder (e.g. INBOX) even if part of the exception list
Diffstat (limited to 'program/include/main.inc')
-rw-r--r--program/include/main.inc26
1 files changed, 13 insertions, 13 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index a3edbf7ca..82d3eb7e9 100644
--- a/program/include/main.inc
+++ b/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 (!$realnames && ($folder_class = rcmail_folder_classname($folder['id'])))
- $foldername = rcube_label($folder_class);
- else {
- $foldername = $folder['name'];
+ 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'];
+
+ // 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('&nbsp;', $nestLevel*4) . $foldername, $folder['id']);
}
-
- $select->add(str_repeat('&nbsp;', $nestLevel*4) . $foldername, $folder['id']);
+ else if ($nestLevel)
+ continue;
if (!empty($folder['folders']))
$out .= rcmail_render_folder_tree_select($folder['folders'], $mbox_name, $maxlength,