Ignore:
Timestamp:
Jul 3, 2009 10:05:33 AM (4 years ago)
Author:
thomasb
Message:

Add new hook 'list_mailboxes' to alter the mailboxlist

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/main.inc

    r2638 r2705  
    10821082      rcmail_build_folder_tree($a_mailboxes, $folder, $delimiter); 
    10831083  } 
     1084   
     1085  // allow plugins to alter the folder tree or to localize folder names 
     1086  $hook = $RCMAIL->plugins->exec_hook('list_mailboxes', array('list' => $a_mailboxes, 'delimiter' => $delimiter)); 
    10841087 
    10851088  if ($type=='select') { 
     
    10901093      $select->add(rcube_label($attrib['noselection']), '0'); 
    10911094     
    1092     rcmail_render_folder_tree_select($a_mailboxes, $mbox_name, $attrib['maxlength'], $select, $attrib['realnames']); 
     1095    rcmail_render_folder_tree_select($hook['list'], $mbox_name, $attrib['maxlength'], $select, $attrib['realnames']); 
    10931096    $out = $select->show(); 
    10941097  } 
    10951098  else { 
    10961099    $js_mailboxlist = array(); 
    1097     $out = html::tag('ul', $attrib, rcmail_render_folder_tree_html($a_mailboxes, $mbox_name, $js_mailboxlist, $attrib), html::$common_attrib); 
     1100    $out = html::tag('ul', $attrib, rcmail_render_folder_tree_html($hook['list'], $mbox_name, $js_mailboxlist, $attrib), html::$common_attrib); 
    10981101     
    10991102    $RCMAIL->output->add_gui_object('mailboxlist', $attrib['id']); 
Note: See TracChangeset for help on using the changeset viewer.