mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 01:13:25 +01:00
* Addressbook - Allow multiselection for customfield added to link title
This commit is contained in:
parent
8f99f175aa
commit
3c5b7c8ba5
@ -181,7 +181,7 @@ class addressbook_hooks
|
||||
if (($cf_opts = Api\Contacts::cf_options()))
|
||||
{
|
||||
$settings['link_title_cf'] = array(
|
||||
'type' => 'select',
|
||||
'type' => 'multiselect',
|
||||
'label' => 'Add a customfield to link title',
|
||||
'name' => 'link_title_cf',
|
||||
'values' => $cf_opts,
|
||||
|
@ -1494,9 +1494,13 @@ class Contacts extends Contacts\Storage
|
||||
$type = null;
|
||||
}
|
||||
$title = $this->fileas($contact,$type);
|
||||
if ($this->prefs['link_title_cf'] && $contact['#'.$this->prefs['link_title_cf']])
|
||||
$field_list = is_string($this->prefs['link_title_cf']) ? explode(',', $this->prefs['link_title_cf']) : $this->prefs['link_title_cf'];
|
||||
foreach ($field_list as $field)
|
||||
{
|
||||
$title .= ' ' . $contact['#'.$this->prefs['link_title_cf']];
|
||||
if($contact['#'.$field])
|
||||
{
|
||||
$title .= ', ' . $contact['#'.$field];
|
||||
}
|
||||
}
|
||||
return $title ;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user