bug fix: get all events of all projects
This commit is contained in:
parent
080157754b
commit
c93ddffa05
2 changed files with 2 additions and 2 deletions
|
@ -173,7 +173,7 @@ class TwingleApiCall {
|
||||||
'public' => 0,
|
'public' => 0,
|
||||||
];
|
];
|
||||||
$response = $this->curlGet($url, $params);
|
$response = $this->curlGet($url, $params);
|
||||||
$finished = is_null($eventId) || count($response['data']) < $this->limit;
|
$finished = ($eventId) || count($response['data']) < $this->limit;
|
||||||
$offset = $offset + $this->limit;
|
$offset = $offset + $this->limit;
|
||||||
if ($response['data']) {
|
if ($response['data']) {
|
||||||
$result = array_merge($result, $response['data']);
|
$result = array_merge($result, $response['data']);
|
||||||
|
|
|
@ -67,7 +67,7 @@ function civicrm_api3_twingle_sync_Post(array $params) {
|
||||||
? trim(Civi::settings()->get('twingle_api_key'))
|
? trim(Civi::settings()->get('twingle_api_key'))
|
||||||
: trim($params['twingle_api_key']);
|
: trim($params['twingle_api_key']);
|
||||||
// If function call does not provide a limit, set a default value
|
// If function call does not provide a limit, set a default value
|
||||||
$limit = empty($params['limit']) ?? 20;
|
$limit = ($params['limit']) ?? NULL;
|
||||||
$twingleApi = new TwingleApiCall($apiKey, $limit);
|
$twingleApi = new TwingleApiCall($apiKey, $limit);
|
||||||
|
|
||||||
// Get all projects from Twingle
|
// Get all projects from Twingle
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue