a few small fixes

This commit is contained in:
Marc Michalsky forumZFD 2020-12-10 15:28:45 +01:00
parent 4921345b88
commit 93d4f46df6
Signed by untrusted user who does not match committer: marc.koch
GPG key ID: 12406554CFB028B9
3 changed files with 5 additions and 9 deletions

View file

@ -88,7 +88,7 @@ class CRM_TwingleCampaign_BAO_TwingleEvent extends Campaign {
// ... if not, get embed data and create event
try {
$result = $event->create($user, $is_test);
$result = $event->create($is_test);
} catch (Exception $e) {
$errorMessage = $e->getMessage();
@ -149,7 +149,6 @@ class CRM_TwingleCampaign_BAO_TwingleEvent extends Campaign {
/**
* Create the Event as a campaign in CiviCRM if it does not exist
*
* @param int $user
* @param bool $is_test
* If true: don't do any changes
*
@ -158,7 +157,7 @@ class CRM_TwingleCampaign_BAO_TwingleEvent extends Campaign {
*
* @throws \CiviCRM_API3_Exception
*/
public function create(int $user, bool $is_test = FALSE) {
public function create(bool $is_test = FALSE) {
// Create campaign only if it does not already exist
if (!$is_test) {
@ -203,7 +202,6 @@ class CRM_TwingleCampaign_BAO_TwingleEvent extends Campaign {
) {
$result = civicrm_api3('Case', 'create', [
'contact_id' => $formattedValues['contact_id'],
'creator_id' => $user,
'case_type_id' => Configuration::get('twinglecampaign_start_case'),
'subject' => $formattedValues['title'],
'start_date' => $formattedValues['created_at'],