diff --git a/addressbook/inc/class.socontacts.inc.php b/addressbook/inc/class.socontacts.inc.php index 49c9aaa011..6f27f158e8 100755 --- a/addressbook/inc/class.socontacts.inc.php +++ b/addressbook/inc/class.socontacts.inc.php @@ -792,13 +792,15 @@ error_log("socontacts::search(".print_r($criteria,true).",'$only_keys','$order_b /** * gets all contact fields from database + * + * @return array of (internal) field-names */ function get_contact_columns() { - $fields = $this->somain->db_data_cols; + $fields = $this->get_fields('all'); foreach ((array)$this->customfields as $cfield => $coptions) { - $fields['#'.$cfield] = '#'.$cfield; + $fields[] = '#'.$cfield; } return $fields; } diff --git a/addressbook/inc/class.uicontacts.inc.php b/addressbook/inc/class.uicontacts.inc.php index f9b47bce6e..414a655d79 100644 --- a/addressbook/inc/class.uicontacts.inc.php +++ b/addressbook/inc/class.uicontacts.inc.php @@ -885,7 +885,7 @@ class uicontacts extends bocontacts } $new_type = array_keys($this->content_types); $content['tid'] = $_GET['typeid'] ? $_GET['typeid'] : $new_type[0]; - foreach($this->get_contact_columns() as $field => $data) + foreach($this->get_contact_columns() as $field) { if ($_GET['presets'][$field]) $content[$field] = $_GET['presets'][$field]; }