From 515f739dc3ec807702f0755f1f134edb2b25461e Mon Sep 17 00:00:00 2001 From: Maggie Date: Fri, 2 May 2014 19:43:54 -0400 Subject: [PATCH] Rewrote function to put display if there is a cid so it would not create an error when emailing contacts from advanced search--might make more sense to remove function but wanted to preserve functionality if needed --- CRM/Contact/Form/Task/Email.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/CRM/Contact/Form/Task/Email.php b/CRM/Contact/Form/Task/Email.php index 6b24cf325d..08f4ef707f 100644 --- a/CRM/Contact/Form/Task/Email.php +++ b/CRM/Contact/Form/Task/Email.php @@ -104,13 +104,18 @@ class CRM_Contact_Form_Task_Email extends CRM_Contact_Form_Task { $this->_context = CRM_Utils_Request::retrieve('context', 'String', $this); $cid = CRM_Utils_Request::retrieve('cid', 'String', $this, FALSE); - $cid = explode(',',$cid); + if ($cid){ + $cid = explode(',',$cid); - foreach ($cid as $key => $val) { - $displayName[] = CRM_Contact_BAO_Contact::displayName($val); - } + foreach ($cid as $key => $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{ + CRM_Utils_System::setTitle(ts('New Email')); + } CRM_Contact_Form_Task_EmailCommon::preProcessFromAddress($this); if (!$cid && $this->_context != 'standalone') { -- 2.25.1