|
|
@ -884,7 +884,7 @@ function rcube_print_time($timer, $label='Timer')
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function rcmail_mailbox_list($attrib)
|
|
|
|
function rcmail_mailbox_list($attrib)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
global $IMAP, $OUTPUT;
|
|
|
|
global $RCMAIL;
|
|
|
|
static $a_mailboxes;
|
|
|
|
static $a_mailboxes;
|
|
|
|
|
|
|
|
|
|
|
|
$attrib += array('maxlength' => 100, 'relanames' => false);
|
|
|
|
$attrib += array('maxlength' => 100, 'relanames' => false);
|
|
|
@ -900,13 +900,13 @@ function rcmail_mailbox_list($attrib)
|
|
|
|
$attrib['id'] = 'rcmboxlist';
|
|
|
|
$attrib['id'] = 'rcmboxlist';
|
|
|
|
|
|
|
|
|
|
|
|
// get mailbox list
|
|
|
|
// get mailbox list
|
|
|
|
$mbox_name = $IMAP->get_mailbox_name();
|
|
|
|
$mbox_name = $RCMAIL->imap->get_mailbox_name();
|
|
|
|
|
|
|
|
|
|
|
|
// build the folders tree
|
|
|
|
// build the folders tree
|
|
|
|
if (empty($a_mailboxes)) {
|
|
|
|
if (empty($a_mailboxes)) {
|
|
|
|
// get mailbox list
|
|
|
|
// get mailbox list
|
|
|
|
$a_folders = $IMAP->list_mailboxes();
|
|
|
|
$a_folders = $RCMAIL->imap->list_mailboxes();
|
|
|
|
$delimiter = $IMAP->get_hierarchy_delimiter();
|
|
|
|
$delimiter = $RCMAIL->imap->get_hierarchy_delimiter();
|
|
|
|
$a_mailboxes = array();
|
|
|
|
$a_mailboxes = array();
|
|
|
|
|
|
|
|
|
|
|
|
foreach ($a_folders as $folder)
|
|
|
|
foreach ($a_folders as $folder)
|
|
|
@ -927,8 +927,10 @@ function rcmail_mailbox_list($attrib)
|
|
|
|
$out = html::tag('ul', $attrib, rcmail_render_folder_tree_html($a_mailboxes, $mbox_name, $attrib['maxlength'], $attrib['realnames']), html::$common_attrib);
|
|
|
|
$out = html::tag('ul', $attrib, rcmail_render_folder_tree_html($a_mailboxes, $mbox_name, $attrib['maxlength'], $attrib['realnames']), html::$common_attrib);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ($type=='ul')
|
|
|
|
if ($type=='ul') {
|
|
|
|
$OUTPUT->add_gui_object('mailboxlist', $attrib['id']);
|
|
|
|
$RCMAIL->output->add_gui_object('mailboxlist', $attrib['id']);
|
|
|
|
|
|
|
|
$RCMAIL->output->set_env('collapsed_folders', $RCMAIL->config->get('collapsed_folders'));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return $out;
|
|
|
|
return $out;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1000,7 +1002,7 @@ function rcmail_build_folder_tree(&$arrFolders, $folder, $delm='/', $path='')
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function rcmail_render_folder_tree_html(&$arrFolders, &$mbox_name, $maxlength, $realnames=false, $nestLevel=0)
|
|
|
|
function rcmail_render_folder_tree_html(&$arrFolders, &$mbox_name, $maxlength, $realnames=false, $nestLevel=0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
global $COMM_PATH, $IMAP, $CONFIG, $OUTPUT, $RCMAIL;
|
|
|
|
global $RCMAIL, $CONFIG;
|
|
|
|
|
|
|
|
|
|
|
|
$idx = 0;
|
|
|
|
$idx = 0;
|
|
|
|
$out = '';
|
|
|
|
$out = '';
|
|
|
@ -1074,8 +1076,6 @@ function rcmail_render_folder_tree_html(&$arrFolders, &$mbox_name, $maxlength, $
|
|
|
|
$idx++;
|
|
|
|
$idx++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$OUTPUT->set_env('collapsed_folders', $RCMAIL->config->get('collapsed_folders'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $out;
|
|
|
|
return $out;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1086,8 +1086,6 @@ function rcmail_render_folder_tree_html(&$arrFolders, &$mbox_name, $maxlength, $
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function rcmail_render_folder_tree_select(&$arrFolders, &$mbox_name, $maxlength, &$select, $realnames=false, $nestLevel=0)
|
|
|
|
function rcmail_render_folder_tree_select(&$arrFolders, &$mbox_name, $maxlength, &$select, $realnames=false, $nestLevel=0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
global $IMAP, $OUTPUT;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$idx = 0;
|
|
|
|
$idx = 0;
|
|
|
|
$out = '';
|
|
|
|
$out = '';
|
|
|
|
foreach ($arrFolders as $key=>$folder)
|
|
|
|
foreach ($arrFolders as $key=>$folder)
|
|
|
|