summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-04-28 13:24:30 +0000
committeralecpl <alec@alec.pl>2008-04-28 13:24:30 +0000
commit3c303216178aa4625dcf6a062a429a0f98cec353 (patch)
tree9fff3a67e7dc2bd0df3cea29d6f13c6cd9239ef5 /program/include
parentac238845e69144bbde89258764e65d93ac068f5a (diff)
- added 5th argument to rcmail_render_folder_tree_select()
Diffstat (limited to 'program/include')
-rw-r--r--program/include/main.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index cf7f89c08..d61159565 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -1875,7 +1875,7 @@ function rcmail_render_folder_tree_html(&$arrFolders, &$mbox_name, $maxlength, $
* Return html for a flat list <select> for the mailbox tree
* @access private
*/
-function rcmail_render_folder_tree_select(&$arrFolders, &$mbox_name, $maxlength, $nestLevel=0)
+function rcmail_render_folder_tree_select(&$arrFolders, &$mbox_name, $maxlength, $nestLevel=0, $selected='')
{
global $IMAP, $OUTPUT;
@@ -1894,13 +1894,14 @@ function rcmail_render_folder_tree_select(&$arrFolders, &$mbox_name, $maxlength,
$foldername = abbreviate_string($foldername, $maxlength);
}
- $out .= sprintf('<option value="%s">%s%s</option>'."\n",
+ $out .= sprintf('<option value="%s"%s>%s%s</option>'."\n",
htmlspecialchars($folder['id']),
+ ($selected == $foldername ? ' selected="selected"' : ''),
str_repeat('&nbsp;', $nestLevel*4),
Q($foldername));
if (!empty($folder['folders']))
- $out .= rcmail_render_folder_tree_select($folder['folders'], $mbox_name, $maxlength, $nestLevel+1);
+ $out .= rcmail_render_folder_tree_select($folder['folders'], $mbox_name, $maxlength, $nestLevel+1, $selected);
$idx++;
}