add comments
This commit is contained in:
parent
3fd17d4bf0
commit
14a16b8cfb
1 changed files with 6 additions and 2 deletions
|
@ -161,14 +161,16 @@ class TwingleProject {
|
||||||
|
|
||||||
if (!$is_test) {
|
if (!$is_test) {
|
||||||
$result = civicrm_api3('Campaign', 'create', $translatedFields);
|
$result = civicrm_api3('Campaign', 'create', $translatedFields);
|
||||||
|
// If the TwingleProject campaign was updated successfully
|
||||||
if ($result['is_error'] == 0) {
|
if ($result['is_error'] == 0) {
|
||||||
$response = $this->getResponse('TwingleProject updated from Twingle');
|
$response = $this->getResponse('TwingleProject updated from Twingle');
|
||||||
}
|
}
|
||||||
|
// If the update failed for any reason
|
||||||
else {
|
else {
|
||||||
$response = $this->getResponse('Updated from Twingle failed');
|
$response = $this->getResponse('Updated from Twingle failed');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// If the TwingleProjects campaign has to get updated but this is in test mode
|
||||||
else {
|
else {
|
||||||
$response = $this->getResponse('TwingleProject outdated');
|
$response = $this->getResponse('TwingleProject outdated');
|
||||||
}
|
}
|
||||||
|
@ -444,7 +446,7 @@ class TwingleProject {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deactivate a project
|
* Deactivate a TwingleProject campaign
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
* TRUE if deactivation was successful
|
* TRUE if deactivation was successful
|
||||||
|
@ -458,9 +460,11 @@ class TwingleProject {
|
||||||
'is_active' => '0',
|
'is_active' => '0',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// Return TRUE if TwingleProject campaign was deactivated successfully
|
||||||
if ($result['is_error'] == 0) {
|
if ($result['is_error'] == 0) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
// Return FALSE if deactivation failed
|
||||||
else {
|
else {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue