🧹 code cleanup
This commit is contained in:
parent
1e6feda923
commit
55f7977c79
2 changed files with 21 additions and 22 deletions
|
@ -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;
|
||||
* } // */
|
||||
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue