From 597c09cf972ffb3c4e86adfcd79aa86b0258d3a8 Mon Sep 17 00:00:00 2001 From: thomascube Date: Fri, 18 May 2007 14:38:11 +0000 Subject: [PATCH] Always populate the address source list --- program/steps/addressbook/func.inc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc index 397b0a12d..574ef874e 100644 --- a/program/steps/addressbook/func.inc +++ b/program/steps/addressbook/func.inc @@ -47,6 +47,12 @@ if (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search $OUTPUT->set_env('source', $source ? $source : '0'); $OUTPUT->set_env('readonly', $CONTACTS->readonly, false); +// add list of address sources to client env +$js_list = array("0" => array('id' => 0, 'readonly' => false)); +foreach ((array)$CONFIG['ldap_public'] as $id => $prop) + $js_list[$id] = array('id' => $id, 'readonly' => !$prop['writeable']); +$OUTPUT->set_env('address_sources', $js_list); + function rcmail_directory_list($attrib) { @@ -64,8 +70,6 @@ function rcmail_directory_list($attrib) ' onmouseup="return %s.folder_mouse_up(\'%s\')">%s'. "\n"; - $js_list = array("$local_id" => array('id' => $local_id, 'readonly' => false)); - // allow the following attributes to be added to the '; $OUTPUT->add_gui_object('folderlist', $attrib['id']); - $OUTPUT->set_env('address_sources', $js_list); return $out; }