🧹 code cleanup

This commit is contained in:
Marc Michalsky forumZFD 2021-04-12 13:18:58 +02:00
parent 794a68c781
commit 938371c8c5
Signed by untrusted user who does not match committer: marc.koch
GPG key ID: 12406554CFB028B9
3 changed files with 5 additions and 5 deletions

View file

@ -35,6 +35,7 @@ class CRM_TwingleCampaign_BAO_TwingleEvent extends Campaign {
throw new Exception("Could not identify parent Campaign: $errorMessage");
}
}
}

View file

@ -107,6 +107,9 @@ function civicrm_api3_twingle_campaign_Get(array $params): array {
_civicrm_api3_twingle_campaign_Get_spec($allowed_params);
$params = array_intersect_key($params, $allowed_params);
// Do not limit the number of results
$params['options'] = ['limit' => 0];
$returnValues = [];
// Get campaign type id for TwingleCampaign
@ -135,9 +138,6 @@ function civicrm_api3_twingle_campaign_Get(array $params): array {
// Include campaign type ot TwingleCampaigns in $params
$params['campaign_type_id'] = $twingle_campaign_campaign_type_id;
// Do not limit the number of results
$params['options'] = ['limit' => 0];
// Get TwingleCampaign children campaigns of the TwingleProject
$campaigns = civicrm_api3('Campaign',
'get',

View file

@ -113,8 +113,7 @@ function civicrm_api3_twingle_campaign_Sync(array $params): array {
}
else {
return civicrm_api3_create_error(
'Could not get TwingleCampaigns: ' .
$campaigns['error_message'],
'Could not get TwingleCampaigns: ' . $campaigns['error_message'],
$params
);
}