mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
get so_sql_cf to read private customfields too, if we ignore acl
This commit is contained in:
parent
77ab3e6531
commit
4928552534
@ -1060,6 +1060,12 @@ class addressbook_bo extends addressbook_so
|
||||
*/
|
||||
function read($contact_id, $ignore_acl=false)
|
||||
{
|
||||
// get so_sql_cf to read private customfields too, if we ignore acl
|
||||
if ($ignore_acl && is_a($this->somain, 'addressbook_sql'))
|
||||
{
|
||||
$cf_backup = (array)$this->somain->customfields;
|
||||
$this->somain->customfields = egw_customfields::get('addressbook', true);
|
||||
}
|
||||
if (!($data = parent::read($contact_id)))
|
||||
{
|
||||
$data = null; // not found
|
||||
@ -1081,6 +1087,10 @@ class addressbook_bo extends addressbook_so
|
||||
$data['adr_two_countryname'] = $GLOBALS['egw']->country->get_full_name($data['adr_two_countrycode'], true);
|
||||
}
|
||||
}
|
||||
if (isset($cf_backup))
|
||||
{
|
||||
$this->somain->customfields = $cf_backup;
|
||||
}
|
||||
//error_log(__METHOD__.'('.array2string($contact_id).') returning '.array2string($data));
|
||||
return $data;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user