From: yashodha Date: Wed, 22 Jan 2014 10:52:19 +0000 (+0530) Subject: fix activity type name/label in api's X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a60ed8408e7bc13ee1686e8869e914afa7adc1d5;p=civicrm-core.git fix activity type name/label in api's --- diff --git a/api/v3/Activity.php b/api/v3/Activity.php index 96b40dd26a..e764770186 100644 --- a/api/v3/Activity.php +++ b/api/v3/Activity.php @@ -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);