🧹 code cleanup
This commit is contained in:
parent
794a68c781
commit
938371c8c5
3 changed files with 5 additions and 5 deletions
|
@ -35,6 +35,7 @@ class CRM_TwingleCampaign_BAO_TwingleEvent extends Campaign {
|
|||
throw new Exception("Could not identify parent Campaign: $errorMessage");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue