Email code cleanup
authorColeman Watts <coleman@civicrm.org>
Tue, 5 Aug 2014 20:52:55 +0000 (21:52 +0100)
committerColeman Watts <coleman@civicrm.org>
Tue, 5 Aug 2014 20:52:55 +0000 (21:52 +0100)
CRM/Contact/Form/Task/Email.php
CRM/Contact/Form/Task/EmailCommon.php

index 08f4ef707fd780cab125f14342833a23f93b317f..51d53b9c9ec9b35bc0ebed4fc1a396fb98e72510 100644 (file)
@@ -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);
index acd679f655d6a2d0f52ade7f2e4cbd8a3bcd218e..6240778d9fb2718129639e39b506d211fa272d8d 100644 (file)
@@ -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;