Changeset 5926 in subversion


Ignore:
Timestamp:
Feb 29, 2012 2:41:36 AM (15 months ago)
Author:
alec
Message:
  • Add 'type' and 'attribs' parameters for render_mailboxlist hook
File:
1 edited

Legend:

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

    r5913 r5926  
    888888 
    889889  // allow plugins to alter the folder tree or to localize folder names 
    890   $hook = $RCMAIL->plugins->exec_hook('render_mailboxlist', array('list' => $a_mailboxes, 'delimiter' => $delimiter)); 
     890  $hook = $RCMAIL->plugins->exec_hook('render_mailboxlist', array( 
     891    'list'      => $a_mailboxes, 
     892    'delimiter' => $delimiter, 
     893    'type'      => $type, 
     894    'attribs'   => $attrib, 
     895  )); 
     896 
     897  $a_mailboxes = $hook['list']; 
     898  $attrib      = $hook['attribs']; 
    891899 
    892900  if ($type == 'select') { 
     
    897905      $select->add(rcube_label($attrib['noselection']), ''); 
    898906 
    899     rcmail_render_folder_tree_select($hook['list'], $mbox_name, $attrib['maxlength'], $select, $attrib['realnames']); 
    900     $out = $select->show(); 
     907    rcmail_render_folder_tree_select($a_mailboxes, $mbox_name, $attrib['maxlength'], $select, $attrib['realnames']); 
     908    $out = $select->show($attrib['default']); 
    901909  } 
    902910  else { 
    903911    $js_mailboxlist = array(); 
    904     $out = html::tag('ul', $attrib, rcmail_render_folder_tree_html($hook['list'], $mbox_name, $js_mailboxlist, $attrib), html::$common_attrib); 
     912    $out = html::tag('ul', $attrib, rcmail_render_folder_tree_html($a_mailboxes, $mbox_name, $js_mailboxlist, $attrib), html::$common_attrib); 
    905913 
    906914    $RCMAIL->output->add_gui_object('mailboxlist', $attrib['id']); 
Note: See TracChangeset for help on using the changeset viewer.