From 5224a6b39423c70da844638f09fde423944578a2 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Sat, 21 Dec 2013 08:14:57 -0500 Subject: [PATCH] Make possible to get contact ID from HTML id attribute (#1489414) --- program/steps/mail/search_contacts.inc | 2 +- program/steps/mail/list_contacts.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/program/steps/mail/list_contacts.inc b/program/steps/mail/list_contacts.inc index dab1464..3ffd9f6 100644 --- a/program/steps/mail/list_contacts.inc +++ b/program/steps/mail/list_contacts.inc @@ -134,7 +134,7 @@ // 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 6a30ad1..6681816 100644 --- a/program/steps/mail/search_contacts.inc +++ b/program/steps/mail/search_contacts.inc @@ -76,7 +76,7 @@ // (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) . -- Gitblit v1.9.1