diff options
Diffstat (limited to 'service')
-rw-r--r-- | service/statusservice.php | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/service/statusservice.php b/service/statusservice.php index 2273d5a98..b36e64c1b 100644 --- a/service/statusservice.php +++ b/service/statusservice.php @@ -30,28 +30,26 @@ class StatusService { $this->appName = $AppName; } - - public function getStatus() { - $improperlyConfiguredCron = false; - - $version = $this->settings->getAppValue( - $this->appName, 'installed_version' - ); + public function isProperlyConfigured() { $cronMode = $this->settings->getAppValue( 'core', 'backgroundjobs_mode' ); - $cronOn = $this->config->getUseCronUpdates(); + $cronOff = !$this->config->getUseCronUpdates(); // check for cron modes which may lead to problems - if ($cronMode !== 'cron' && $cronOn) { - $improperlyConfiguredCron = true; - } + return $cronMode === 'cron' || $cronOff; + } + + public function getStatus() { + $version = $this->settings->getAppValue( + $this->appName, 'installed_version' + ); return [ 'version' => $version, 'warnings' => [ - 'improperlyConfiguredCron' => $improperlyConfiguredCron + 'improperlyConfiguredCron' => !$this->isProperlyConfigured() ] ]; } |