push Projects to Twingle

This commit is contained in:
Marc Michalsky forumZFD 2020-12-14 17:25:47 +01:00
parent 7a52e18418
commit 999acd1029
Signed by untrusted user who does not match committer: marc.koch
GPG key ID: 12406554CFB028B9

View file

@ -96,7 +96,13 @@ class CRM_TwingleCampaign_BAO_TwingleApiCall {
}
// Prepare url for curl
$url = $this->protocol . 'project' . $this->baseUrl . $values['id'];
if ($values['id']) {
$url = $this->protocol . 'project' . $this->baseUrl . $values['id'];
}
else {
$url = $this->protocol . 'project' . $this->baseUrl . 'by-organisation/' .
$this->organisationId;
}
// Send curl and return result
return $this->curlPost($url, $values);