diff options
author | alecpl <alec@alec.pl> | 2012-02-29 07:41:36 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2012-02-29 07:41:36 +0000 |
commit | 8f77c03bd8276101b696b7321e61ea7b1c0c4263 (patch) | |
tree | 68e3e1ebcca6a4a51fd011d9afd3efcdb6a3762c /program | |
parent | 2b4855b1aaaef854fd22cbc260788a5c05794abb (diff) |
- Add 'type' and 'attribs' parameters for render_mailboxlist hook
Diffstat (limited to 'program')
-rw-r--r-- | program/include/main.inc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/program/include/main.inc b/program/include/main.inc index 63c3259c2..798a1fe0e 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -887,7 +887,15 @@ 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)); + $hook = $RCMAIL->plugins->exec_hook('render_mailboxlist', array( + 'list' => $a_mailboxes, + 'delimiter' => $delimiter, + 'type' => $type, + 'attribs' => $attrib, + )); + + $a_mailboxes = $hook['list']; + $attrib = $hook['attribs']; if ($type == 'select') { $select = new html_select($attrib); @@ -896,12 +904,12 @@ function rcmail_mailbox_list($attrib) if ($attrib['noselection']) $select->add(rcube_label($attrib['noselection']), ''); - rcmail_render_folder_tree_select($hook['list'], $mbox_name, $attrib['maxlength'], $select, $attrib['realnames']); - $out = $select->show(); + rcmail_render_folder_tree_select($a_mailboxes, $mbox_name, $attrib['maxlength'], $select, $attrib['realnames']); + $out = $select->show($attrib['default']); } else { $js_mailboxlist = array(); - $out = html::tag('ul', $attrib, rcmail_render_folder_tree_html($hook['list'], $mbox_name, $js_mailboxlist, $attrib), html::$common_attrib); + $out = html::tag('ul', $attrib, rcmail_render_folder_tree_html($a_mailboxes, $mbox_name, $js_mailboxlist, $attrib), html::$common_attrib); $RCMAIL->output->add_gui_object('mailboxlist', $attrib['id']); $RCMAIL->output->set_env('mailboxes', $js_mailboxlist); |