diff options
Diffstat (limited to 'program/steps/addressbook/func.inc')
-rw-r--r-- | program/steps/addressbook/func.inc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc index f261527e4..84796baee 100644 --- a/program/steps/addressbook/func.inc +++ b/program/steps/addressbook/func.inc @@ -729,6 +729,24 @@ function rcmail_format_date_col($val) } +function rcmail_contact_key($row, $sort_col) +{ + $key = $row[$sort_col] . ':' . $row['sourceid']; + + // add email to a key to not skip contacts with the same name (#1488375) + if (!empty($row['email'])) { + if (is_array($row['email'])) { + $key .= ':' . implode(':', $row['email']); + } + else { + $key .= ':' . $row['email']; + } + } + + return $key; +} + + /** * Returns contact ID(s) and source(s) from GET/POST data * |