mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-27 13:22:09 +02:00
fixed customfields returned as serialized array
This commit is contained in:
parent
c83fcf3dfe
commit
b9008dd3ad
@ -57,20 +57,23 @@ class socontacts
|
|||||||
{
|
{
|
||||||
if($GLOBALS['egw_info']['server']['contact_repository'] == 'sql' || !isset($GLOBALS['egw_info']['server']['contact_repository']))
|
if($GLOBALS['egw_info']['server']['contact_repository'] == 'sql' || !isset($GLOBALS['egw_info']['server']['contact_repository']))
|
||||||
{
|
{
|
||||||
$this->somain = CreateObject('etemplate.so_sql');
|
$this->somain =& CreateObject('etemplate.so_sql','phpgwapi','phpgw_addressbook');
|
||||||
$this->somain->so_sql('phpgwapi','phpgw_addressbook');
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->somain = CreateObject('addressbook.so_'.$GLOBALS['egw_info']['server']['contact_repository']);
|
$this->somain =& CreateObject('addressbook.so_'.$GLOBALS['egw_info']['server']['contact_repository']);
|
||||||
}
|
}
|
||||||
$this->somain->contacts_id = 'id';
|
$this->somain->contacts_id = 'id';
|
||||||
$this->soextra = CreateObject('etemplate.so_sql');
|
$this->soextra =& CreateObject('etemplate.so_sql');
|
||||||
$this->soextra->so_sql('phpgwapi',$this->extra_table);
|
$this->soextra->so_sql('phpgwapi',$this->extra_table);
|
||||||
|
|
||||||
$custom =& CreateObject('admin.customfields',$contact_app);
|
$custom =& CreateObject('admin.customfields',$contact_app);
|
||||||
$this->customfields = $custom->get_customfields();
|
$this->customfields = $custom->get_customfields();
|
||||||
|
if ($this->customfields && !is_array($this->customfields))
|
||||||
|
{
|
||||||
|
$this->customfields = unserialize($this->customfields);
|
||||||
|
}
|
||||||
|
if (!$this->customfields) $this->customfields = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user