diff options
author | alecpl <alec@alec.pl> | 2012-03-05 19:59:07 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2012-03-05 19:59:07 +0000 |
commit | 053538bf60e354a64664fb9a992cbbda37d70f76 (patch) | |
tree | 764ebf819debced16b472f754bbf04a54c5b3b06 /program/steps/addressbook/func.inc | |
parent | b1a8dabb1fcea27e19d71dda138191dea3dc529f (diff) |
- Merge r5966 from trunk (#1488375)
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 caf964db7..ec97e819f 100644 --- a/program/steps/addressbook/func.inc +++ b/program/steps/addressbook/func.inc @@ -728,6 +728,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 * |