fix activity type name/label in api's
authoryashodha <yashodha.chaku@webaccess.co.in>
Wed, 22 Jan 2014 10:52:19 +0000 (16:22 +0530)
committeryashodha <yashodha.chaku@webaccess.co.in>
Wed, 22 Jan 2014 10:52:19 +0000 (16:22 +0530)
api/v3/Activity.php

index 96b40dd26ad51ec99cd53815defe6d521f708d49..e7647701865ce8e76bef6d8eb780ba395648ce8e 100644 (file)
@@ -369,12 +369,12 @@ SELECT  count(*)
   // this should be handled by wrapper layer & probably the api would already manage it
   //correctly by doing pseudoconstant validation
   // needs testing
-  $activityTypes = CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'name', TRUE);
+  $activityTypes = CRM_Activity_BAO_Activity::buildOptions('activity_type_id', 'validate');
   $activityName  = CRM_Utils_Array::value('activity_name', $params);
   $activityName  = ucfirst($activityName);
   $activityLabel = CRM_Utils_Array::value('activity_label', $params);
   if ($activityLabel) {
-    $activityTypes = CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE);
+    $activityTypes = CRM_Activity_BAO_Activity::buildOptions('activity_type_id', 'create');
   }
 
   $activityTypeId = CRM_Utils_Array::value('activity_type_id', $params);