* Addressbook: disable custom field tabs, if contact is stored in LDAP, which does not support CFs

This commit is contained in:
Ralf Becker 2012-02-17 15:01:31 +00:00
parent d56ee2a0c7
commit 0e9631781b

View File

@ -1810,8 +1810,8 @@ class addressbook_ui extends addressbook_bo
}
// disable not needed tabs
$readonlys['tabs']['cats'] = !($content['cat_tab'] = $this->config['cat_tab']);
$readonlys['tabs']['custom'] = !$this->customfields;
$readonlys['tabs']['custom_private'] = !$this->customfields || !$this->config['private_cf_tab'];
$readonlys['tabs']['custom'] = !$this->customfields || $this->get_backend($content['id'],$content['owner']) == $this->so_accounts;
$readonlys['tabs']['custom_private'] = $readonlys['tabs']['custom'] || !$this->config['private_cf_tab'];
$readonlys['tabs']['distribution_list'] = !$content['distrib_lists'];#false;
$readonlys['tabs']['history'] = $this->contact_repository == 'ldap' || !$content['id'] ||
$this->account_repository == 'ldap' && $content['account_id'];