🧹 code cleanup

This commit is contained in:
Marc Michalsky forumZFD 2021-03-18 15:54:49 +01:00
parent 1e6feda923
commit 55f7977c79
Signed by untrusted user who does not match committer: marc.koch
GPG key ID: 12406554CFB028B9
2 changed files with 21 additions and 22 deletions

View file

@ -147,13 +147,13 @@ class CRM_TwingleCampaign_Upgrader extends CRM_TwingleCampaign_Upgrader_Base {
public function enable() {
// Enable cron job
try {
$jobId = civicrm_api3('Job', 'getsingle', [
'name' => "TwingleSync",
])['id'];
civicrm_api3('Job', 'create', [
'id' => $jobId,
'is_active' => 1,
]);
$jobId = civicrm_api3('Job', 'getsingle', [
'name' => "TwingleSync",
])['id'];
civicrm_api3('Job', 'create', [
'id' => $jobId,
'is_active' => 1,
]);
} catch (CiviCRM_API3_Exception $e) {
Civi::log()->error(
E::LONG_NAME .
@ -200,18 +200,18 @@ class CRM_TwingleCampaign_Upgrader extends CRM_TwingleCampaign_Upgrader_Base {
}
/**
* Example: Run a couple simple queries.
*
* @return TRUE on success
* @throws Exception
*
* public function upgrade_4200() {
* $this->ctx->log->info('Applying update 4200');
* CRM_Core_DAO::executeQuery('UPDATE foo SET bar = "whiz"');
* CRM_Core_DAO::executeQuery('DELETE FROM bang WHERE willy = wonka(2)');
* return TRUE;
* } // */
/**
* Example: Run a couple simple queries.
*
* @return TRUE on success
* @throws Exception
*
* public function upgrade_4200() {
* $this->ctx->log->info('Applying update 4200');
* CRM_Core_DAO::executeQuery('UPDATE foo SET bar = "whiz"');
* CRM_Core_DAO::executeQuery('DELETE FROM bang WHERE willy = wonka(2)');
* return TRUE;
* } // */
/**