From ca20de424ea9ebec3bfe7fde7d1be5c6836b8249 Mon Sep 17 00:00:00 2001 From: ralf Date: Tue, 10 Sep 2024 10:54:40 +0200 Subject: [PATCH] fix config to show NO private custom-field tab was not taken into account (private CF tab was always used, for private CFs) --- addressbook/inc/class.addressbook_ui.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index b904b7ce54..7da90c8fb7 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -2735,12 +2735,12 @@ class addressbook_ui extends addressbook_bo { return substr($cf['name'], 0, 5) === 'ldap_'; })); - $readonlys['tabs']['custom_private'] = $readonlys['tabs']['custom'] || !$this->config['private_cf_tab']; + $readonlys['tabs']['custom_private'] = $readonlys['tabs']['custom'] || empty($this->config['private_cf_tab']); $readonlys['tabs']['distribution_list'] = !$content['distrib_lists'];#false; $readonlys['tabs']['history'] = $this->contact_repository != 'sql' || !$content['id'] || $this->account_repository != 'sql' && $content['account_id']; if (!$content['id']) $readonlys['button[delete]'] = !$content['id']; - if ($this->config['private_cf_tab']) $content['no_private_cfs'] = 0; + $content['no_private_cfs'] = empty($this->config['private_cf_tab']); $content['hide_change_org'] = $readonlys['change_org'] = empty($content['org_name']) || $view; // for editing the own account (by a non-admin), enable only the fields allowed via the "own_account_acl" @@ -3220,7 +3220,7 @@ class addressbook_ui extends addressbook_bo $readonlys['tabs']['distribution_list'] = !$content['distrib_lists'];#false; $readonlys['tabs']['history'] = $this->contact_repository != 'sql' || !$content['id'] || $this->account_repository != 'sql' && $content['account_id']; - if ($this->config['private_cf_tab']) $content['no_private_cfs'] = 0; + $content['no_private_cfs'] = empty($this->config['private_cf_tab']); // last and next calendar date if (!empty($content['id'])) $dates = current($this->read_calendar(array($content['account_id'] ? $content['account_id'] : 'c'.$content['id']),false)); @@ -3455,7 +3455,7 @@ class addressbook_ui extends addressbook_bo $content['no_tid'] = true; $content['showsearchbuttons'] = true; // enable search operation and search buttons| they're disabled by default - if ($this->config['private_cf_tab']) $content['no_private_cfs'] = 0; + $content['no_private_cfs'] = empty($this->config['private_cf_tab']); return $this->tmpl->exec('addressbook.addressbook_ui.extSearch',$content,$sel_options,$readonlys,array(),2); }