let API call not overwrite campaign_type_id
This commit is contained in:
parent
e843d8827c
commit
682ba5e7e2
3 changed files with 13 additions and 31 deletions
|
@ -54,7 +54,7 @@ function _civicrm_api3_twingle_form_Get_spec(array &$spec) {
|
|||
* @see civicrm_api3_create_success
|
||||
*
|
||||
*/
|
||||
function civicrm_api3_twingle_form_Get(array $params) {
|
||||
function civicrm_api3_twingle_form_Get(array $params): array {
|
||||
|
||||
// Get custom fields
|
||||
$custom_field_mapping = Cache::getInstance()->getCustomFieldMapping();
|
||||
|
@ -66,11 +66,10 @@ function civicrm_api3_twingle_form_Get(array $params) {
|
|||
unset($params['twingle_project_type']);
|
||||
}
|
||||
|
||||
$request = [
|
||||
'sequential' => 1,
|
||||
'is_active' => 1,
|
||||
'campaign_type_id' => "twingle_project"
|
||||
];
|
||||
$params['campaign_type_id'] = "twingle_project";
|
||||
$params['is_active'] = 1;
|
||||
$request = [];
|
||||
|
||||
foreach($params as $key => $param) {
|
||||
$request[$key] = $param;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue