From b3dbca230226490e5c453fee75bb2ee65cb6b8ee Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 5 Aug 2014 21:52:55 +0100 Subject: [PATCH] Email code cleanup --- CRM/Contact/Form/Task/Email.php | 7 ++++--- CRM/Contact/Form/Task/EmailCommon.php | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CRM/Contact/Form/Task/Email.php b/CRM/Contact/Form/Task/Email.php index 08f4ef707f..51d53b9c9e 100644 --- a/CRM/Contact/Form/Task/Email.php +++ b/CRM/Contact/Form/Task/Email.php @@ -106,14 +106,15 @@ class CRM_Contact_Form_Task_Email extends CRM_Contact_Form_Task { $cid = CRM_Utils_Request::retrieve('cid', 'String', $this, FALSE); if ($cid){ $cid = explode(',',$cid); + $displayName = array(); - foreach ($cid as $key => $val) { + foreach ($cid as $val) { $displayName[] = CRM_Contact_BAO_Contact::displayName($val); } - CRM_Utils_System::setTitle(implode(',',$displayName) . ' - ' . ts('Email')); + CRM_Utils_System::setTitle(implode(',', $displayName) . ' - ' . ts('Email')); } - else{ + else { CRM_Utils_System::setTitle(ts('New Email')); } CRM_Contact_Form_Task_EmailCommon::preProcessFromAddress($this); diff --git a/CRM/Contact/Form/Task/EmailCommon.php b/CRM/Contact/Form/Task/EmailCommon.php index acd679f655..6240778d9f 100644 --- a/CRM/Contact/Form/Task/EmailCommon.php +++ b/CRM/Contact/Form/Task/EmailCommon.php @@ -133,7 +133,7 @@ class CRM_Contact_Form_Task_EmailCommon { //here we are getting logged in user id as array but we need target contact id. CRM-5988 $cid = $form->get('cid'); if ($cid) { - $form->_contactIds = explode(',',$cid); + $form->_contactIds = explode(',', $cid); } if (count($form->_contactIds) > 1) { $form->_single = FALSE; -- 2.25.1