From 3662628a3f7b97d1c586cb98dc37e38632053087 Mon Sep 17 00:00:00 2001 From: Tyrell Cook Date: Thu, 1 May 2014 16:01:27 -0400 Subject: [PATCH] CRM-14466 made changes to how variables are initialized ---------------------------------------- * CRM-14466: View manage case screen gives two PHP Notices (civicrm/contact/view/case?reset=1&action=view&cid=xxx&id=yyy&show=1) https://issues.civicrm.org/jira/browse/CRM-14466 --- CRM/Activity/Page/AJAX.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/CRM/Activity/Page/AJAX.php b/CRM/Activity/Page/AJAX.php index 643443a0c3..df6a9ccd75 100644 --- a/CRM/Activity/Page/AJAX.php +++ b/CRM/Activity/Page/AJAX.php @@ -220,9 +220,7 @@ class CRM_Activity_Page_AJAX { $rel['name'] = '(not assigned)'; $rel['phone'] = ''; $rel['email'] = ''; - $rel['cid'] = ''; $rel['source'] = 'caseRoles'; - $rel['actions'] = ''; $caseRelationships[] = $rel; } else { foreach($value as $clientRole) { @@ -233,7 +231,6 @@ class CRM_Activity_Page_AJAX { $relClient['email'] = $clientRole['email']; $relClient['cid'] = $clientRole['contact_id']; $relClient['source'] = 'contact'; - $relClient['actions'] = ''; $caseRelationships[] = $relClient; } } @@ -258,7 +255,7 @@ class CRM_Activity_Page_AJAX { // Get rid of the "
(Case Manager)" from label list($typeLabel) = explode('<', $row['relation']); // view user links - if ($row['cid']) { + if (!empty($row['cid'])) { $row['name'] = ''.$row['name'].''; } @@ -267,6 +264,7 @@ class CRM_Activity_Page_AJAX { $row['email'] = ''; } // edit links + $row['actions'] = ''; if ($hasAccessToAllCases) { switch($row['source']){ case 'caseRel': @@ -286,14 +284,12 @@ class CRM_Activity_Page_AJAX { ''; break; } - } else { - $row['actions'] = ''; } $idx++; } $iFilteredTotal = $iTotal = $params['total'] = count($allCaseRelationships); $selectorElements = array('relation', 'name', 'phone', 'email', 'actions'); - + echo CRM_Utils_JSON::encodeDataTableSelector($caseRelationships, $sEcho, $iTotal, $iFilteredTotal, $selectorElements); CRM_Utils_System::civiExit(); } -- 2.25.1