CRM-19723 - Fix activity links
authorColeman Watts <coleman@civicrm.org>
Fri, 16 Dec 2016 20:32:21 +0000 (15:32 -0500)
committerColeman Watts <coleman@civicrm.org>
Fri, 16 Dec 2016 20:32:21 +0000 (15:32 -0500)
CRM/Activity/Form/ActivityLinks.php

index cddd1bbf3a548969713f7bb7a8bda06ee35dece2..ef08fde392e098a1882ef1b50548a71722c2f654 100644 (file)
@@ -57,7 +57,7 @@ class CRM_Activity_Form_ActivityLinks extends CRM_Core_Form {
 
     $activityTypes = array();
 
-    foreach ($allTypes as $id => $act) {
+    foreach ($allTypes as $act) {
       $url = 'civicrm/activity/add';
       if ($act['name'] == 'Email') {
         if (!CRM_Utils_Mail::validOutBoundMail() || !$contactId) {
@@ -93,7 +93,7 @@ class CRM_Activity_Form_ActivityLinks extends CRM_Core_Form {
         continue;
       }
       $act['url'] = CRM_Utils_System::url($url,
-        "{$urlParams}{$id}", FALSE, NULL, FALSE
+        "{$urlParams}{$act['value']}", FALSE, NULL, FALSE
       );
       $act += array('icon' => 'fa-plus-square-o');
       $activityTypes[$act['value']] = $act;