summaryrefslogtreecommitdiffstats
path: root/service
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2016-04-13 21:09:18 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2016-04-13 21:09:18 +0200
commitdb10a37080730d3a1957b858f8bdc1710801bcbe (patch)
treebe622672fa5bee033b59594dc33060fac7f71b55 /service
parent87cd4f362396d754632bad842daedac4d8741307 (diff)
Better cron warning message, do not run feed updates when in ajax or web cron mode
Diffstat (limited to 'service')
-rw-r--r--service/statusservice.php22
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()
]
];
}