forked from extern/egroupware
Disable history logging for accounts when the backend is LDAP because it was showing changes for all entries instead of the current entry
This commit is contained in:
parent
7920304f13
commit
c87e751c76
@ -815,10 +815,12 @@ class addressbook_bo extends addressbook_so
|
|||||||
// Notify linked apps about changes in the contact data
|
// Notify linked apps about changes in the contact data
|
||||||
egw_link::notify_update('addressbook', $contact['id'], $contact);
|
egw_link::notify_update('addressbook', $contact['id'], $contact);
|
||||||
|
|
||||||
// Record change history
|
// Record change history for sql - doesn't work for LDAP accounts
|
||||||
|
if(!$contact['account_id'] || $contact['account_id'] && $this->account_repository == 'sql') {
|
||||||
$deleted = ($old['tid'] == addressbook_so::DELETED_TYPE || $contact['tid'] == addressbook_so::DELETED_TYPE);
|
$deleted = ($old['tid'] == addressbook_so::DELETED_TYPE || $contact['tid'] == addressbook_so::DELETED_TYPE);
|
||||||
$this->tracking->track($to_write, $old, null, $deleted);
|
$this->tracking->track($to_write, $old, null, $deleted);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $this->error ? false : $contact['id'];
|
return $this->error ? false : $contact['id'];
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ class addressbook_tracking extends bo_tracking
|
|||||||
|
|
||||||
$this->contacts =& $bocontacts;
|
$this->contacts =& $bocontacts;
|
||||||
|
|
||||||
if (is_object($bocontacts->somain))
|
if (is_object($bocontacts->somain) && is_array($bocontacts->somain->db_cols))
|
||||||
{
|
{
|
||||||
$this->field2history = array_combine($bocontacts->somain->db_cols, $bocontacts->somain->db_cols);
|
$this->field2history = array_combine($bocontacts->somain->db_cols, $bocontacts->somain->db_cols);
|
||||||
unset($this->field2history['modified']);
|
unset($this->field2history['modified']);
|
||||||
|
@ -1443,6 +1443,7 @@ class addressbook_ui extends addressbook_bo
|
|||||||
$readonlys['tabs']['custom'] = !$this->customfields;
|
$readonlys['tabs']['custom'] = !$this->customfields;
|
||||||
$readonlys['tabs']['custom_private'] = !$this->customfields || !$this->config['private_cf_tab'];
|
$readonlys['tabs']['custom_private'] = !$this->customfields || !$this->config['private_cf_tab'];
|
||||||
$readonlys['tabs']['distribution_list'] = !$content['distrib_lists'];#false;
|
$readonlys['tabs']['distribution_list'] = !$content['distrib_lists'];#false;
|
||||||
|
$readonlys['tabs']['history'] = $this->account_repository == 'ldap' && $content['account_id'];
|
||||||
$readonlys['button[delete]'] = !$content['id'];
|
$readonlys['button[delete]'] = !$content['id'];
|
||||||
if ($this->config['private_cf_tab']) $content['no_private_cfs'] = 0;
|
if ($this->config['private_cf_tab']) $content['no_private_cfs'] = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user