fixed customfields returned as serialized array

This commit is contained in:
Ralf Becker 2005-11-07 16:12:41 +00:00
parent c83fcf3dfe
commit b9008dd3ad

View File

@ -57,20 +57,23 @@ class socontacts
{
if($GLOBALS['egw_info']['server']['contact_repository'] == 'sql' || !isset($GLOBALS['egw_info']['server']['contact_repository']))
{
$this->somain = CreateObject('etemplate.so_sql');
$this->somain->so_sql('phpgwapi','phpgw_addressbook');
$this->somain =& CreateObject('etemplate.so_sql','phpgwapi','phpgw_addressbook');
}
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->soextra = CreateObject('etemplate.so_sql');
$this->soextra =& CreateObject('etemplate.so_sql');
$this->soextra->so_sql('phpgwapi',$this->extra_table);
$custom =& CreateObject('admin.customfields',$contact_app);
$this->customfields = $custom->get_customfields();
if ($this->customfields && !is_array($this->customfields))
{
$this->customfields = unserialize($this->customfields);
}
if (!$this->customfields) $this->customfields = array();
}
/**