From 14a09e9745ab65b3649babfb9ed7fb6872ca0225 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 16 Jul 2020 11:28:21 -0400 Subject: [PATCH] ScheduledJob cleanup, remove unused var --- CRM/Core/ScheduledJob.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/CRM/Core/ScheduledJob.php b/CRM/Core/ScheduledJob.php index fbf0bfd5b8..71efa5536c 100644 --- a/CRM/Core/ScheduledJob.php +++ b/CRM/Core/ScheduledJob.php @@ -61,23 +61,22 @@ class CRM_Core_ScheduledJob { } /** - * @param null $date + * Update the last_run date of this job */ - public function saveLastRun($date = NULL) { + public function saveLastRun() { $dao = new CRM_Core_DAO_Job(); $dao->id = $this->id; - $dao->last_run = ($date == NULL) ? CRM_Utils_Date::currentDBDate() : CRM_Utils_Date::currentDBDate($date); + $dao->last_run = CRM_Utils_Date::currentDBDate(); $dao->save(); } /** - * @return void + * Delete the scheduled_run_date from this job */ public function clearScheduledRunDate() { - CRM_Core_DAO::executeQuery('UPDATE civicrm_job SET scheduled_run_date = NULL WHERE id = %1', - [ - '1' => [$this->id, 'Integer'], - ]); + CRM_Core_DAO::executeQuery('UPDATE civicrm_job SET scheduled_run_date = NULL WHERE id = %1', [ + '1' => [$this->id, 'Integer'], + ]); } /** -- 2.25.1