From 793e73da01bb91394ab4576bdc258fc6bdaf8e86 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Fri, 14 Jun 2024 21:50:38 +1200 Subject: [PATCH] ENH Use class name instead of self --- src/Controllers/QueuedJobsAdmin.php | 4 ++-- src/Services/QueuedJobService.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Controllers/QueuedJobsAdmin.php b/src/Controllers/QueuedJobsAdmin.php index 29b49517..e960719c 100644 --- a/src/Controllers/QueuedJobsAdmin.php +++ b/src/Controllers/QueuedJobsAdmin.php @@ -94,7 +94,7 @@ public function getEditForm($id = null, $fields = null) { $form = parent::getEditForm($id, $fields); - $filter = $this->jobQueue->getJobListFilter(null, self::config()->max_finished_jobs_age); + $filter = $this->jobQueue->getJobListFilter(null, static::config()->max_finished_jobs_age); $list = QueuedJobDescriptor::get()->where($filter)->sort('Created', 'DESC'); @@ -199,7 +199,7 @@ public function createjob($data, Form $form) // If the user has select the European date format as their setting then replace '/' with '-' in the // date string so PHP treats the date as this format. - if (Security::getCurrentUser()->DateFormat == self::$date_format_european) { + if (Security::getCurrentUser()->DateFormat == QueuedJobsAdmin::$date_format_european) { $time = str_replace('/', '-', $time ?? ''); } diff --git a/src/Services/QueuedJobService.php b/src/Services/QueuedJobService.php index 69edadf7..20eddc46 100644 --- a/src/Services/QueuedJobService.php +++ b/src/Services/QueuedJobService.php @@ -1321,7 +1321,7 @@ public function getJobListFilter($type = null, $includeUpUntil = 0) */ public function runQueue($queue) { - if (!self::config()->get('disable_health_check')) { + if (!static::config()->get('disable_health_check')) { $this->checkJobHealth($queue); } $this->checkdefaultJobs($queue);