Changeset 578 in subversion


Ignore:
Timestamp:
May 18, 2007 9:06:01 AM (6 years ago)
Author:
thomasb
Message:

Always populate the address source list

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/release-0.1-rc1/program/steps/addressbook/func.inc

    r567 r578  
    4848$OUTPUT->set_env('readonly', $CONTACTS->readonly, false); 
    4949 
     50// add list of address sources to client env 
     51$js_list = array("0" => array('id' => 0, 'readonly' => false)); 
     52foreach ((array)$CONFIG['ldap_public'] as $id => $prop) 
     53  $js_list[$id] = array('id' => $id, 'readonly' => !$prop['writeable']); 
     54$OUTPUT->set_env('address_sources', $js_list); 
     55 
    5056 
    5157function rcmail_directory_list($attrib) 
     
    6571    "</a></li>\n"; 
    6672     
    67   $js_list = array("$local_id" => array('id' => $local_id, 'readonly' => false)); 
    68  
    6973  // allow the following attributes to be added to the <ul> tag 
    7074  $out = '<ul' . create_attrib_string($attrib, array('style', 'class', 'id')) . ">\n"; 
     
    100104      $js_id, 
    101105      !empty($prop['name']) ? Q($prop['name']) : Q($id)); 
    102        
    103     $js_list[$id] = array('id' => $id, 'readonly' => !$prop['writeable']); 
    104106  } 
    105107   
     
    107109 
    108110  $OUTPUT->add_gui_object('folderlist', $attrib['id']); 
    109   $OUTPUT->set_env('address_sources', $js_list); 
    110111   
    111112  return $out; 
Note: See TracChangeset for help on using the changeset viewer.