|
|
|
@ -1190,12 +1190,12 @@ function rcmail_mailbox_list($attrib)
|
|
|
|
|
// allow plugins to alter the folder tree or to localize folder names
|
|
|
|
|
$hook = $RCMAIL->plugins->exec_hook('render_mailboxlist', array('list' => $a_mailboxes, 'delimiter' => $delimiter));
|
|
|
|
|
|
|
|
|
|
if ($type=='select') {
|
|
|
|
|
if ($type == 'select') {
|
|
|
|
|
$select = new html_select($attrib);
|
|
|
|
|
|
|
|
|
|
// add no-selection option
|
|
|
|
|
if ($attrib['noselection'])
|
|
|
|
|
$select->add(rcube_label($attrib['noselection']), '0');
|
|
|
|
|
$select->add(rcube_label($attrib['noselection']), '');
|
|
|
|
|
|
|
|
|
|
rcmail_render_folder_tree_select($hook['list'], $mbox_name, $attrib['maxlength'], $select, $attrib['realnames']);
|
|
|
|
|
$out = $select->show();
|
|
|
|
@ -1420,15 +1420,13 @@ function rcmail_render_folder_tree_html(&$arrFolders, &$mbox_name, &$jslist, $at
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
function rcmail_render_folder_tree_select(&$arrFolders, &$mbox_name, $maxlength, &$select, $realnames=false, $nestLevel=0)
|
|
|
|
|
{
|
|
|
|
|
$idx = 0;
|
|
|
|
|
{
|
|
|
|
|
$out = '';
|
|
|
|
|
foreach ($arrFolders as $key=>$folder)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
foreach ($arrFolders as $key=>$folder) {
|
|
|
|
|
if (!$realnames && ($folder_class = rcmail_folder_classname($folder['id'])))
|
|
|
|
|
$foldername = rcube_label($folder_class);
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
else {
|
|
|
|
|
$foldername = $folder['name'];
|
|
|
|
|
|
|
|
|
|
// shorten the folder name to a given length
|
|
|
|
@ -1440,12 +1438,10 @@ function rcmail_render_folder_tree_select(&$arrFolders, &$mbox_name, $maxlength,
|
|
|
|
|
|
|
|
|
|
if (!empty($folder['folders']))
|
|
|
|
|
$out .= rcmail_render_folder_tree_select($folder['folders'], $mbox_name, $maxlength, $select, $realnames, $nestLevel+1);
|
|
|
|
|
|
|
|
|
|
$idx++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $out;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|