summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-12-21 14:14:57 +0100
committerAleksander Machniak <alec@alec.pl>2013-12-21 14:14:57 +0100
commit5224a6b39423c70da844638f09fde423944578a2 (patch)
tree1a5502468a601de0d58acc8761a912a66a933486
parentf6d23a8dce6258f954257174bc03f2b85a21afdf (diff)
Make possible to get contact ID from HTML id attribute (#1489414)
-rw-r--r--program/steps/mail/list_contacts.inc2
-rw-r--r--program/steps/mail/search_contacts.inc2
2 files changed, 2 insertions, 2 deletions
diff --git a/program/steps/mail/list_contacts.inc b/program/steps/mail/list_contacts.inc
index dab146431..3ffd9f6a6 100644
--- a/program/steps/mail/list_contacts.inc
+++ b/program/steps/mail/list_contacts.inc
@@ -134,7 +134,7 @@ else if (!empty($result) && $result->count > 0) {
// add record for every email address of the contact
$emails = $CONTACTS->get_col_values('email', $row, true);
foreach ($emails as $i => $email) {
- $row_id = $row['ID'].$i;
+ $row_id = $row['ID'].'-'.$i;
$jsresult[$row_id] = format_email_recipient($email, $name);
$classname = $row['_type'] == 'group' ? 'group' : 'person';
$keyname = $row['_type'] == 'group' ? 'contactgroup' : 'contact';
diff --git a/program/steps/mail/search_contacts.inc b/program/steps/mail/search_contacts.inc
index 6a30ad1f5..668181623 100644
--- a/program/steps/mail/search_contacts.inc
+++ b/program/steps/mail/search_contacts.inc
@@ -76,7 +76,7 @@ if (!empty($result) && $result->count > 0) {
// (same as in list_contacts.inc)
$emails = $source->get_col_values('email', $row, true);
foreach ($emails as $i => $email) {
- $row_id = $row['ID'].$i;
+ $row_id = $row['ID'].'-'.$i;
$jsresult[$row_id] = format_email_recipient($email, $name);
$OUTPUT->command('add_contact_row', $row_id, array(
'contact' => html::span(array('title' => $email), Q($name ? $name : $email) .