diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2016-04-13 21:09:18 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2016-04-13 21:09:18 +0200 |
commit | db10a37080730d3a1957b858f8bdc1710801bcbe (patch) | |
tree | be622672fa5bee033b59594dc33060fac7f71b55 /cron | |
parent | 87cd4f362396d754632bad842daedac4d8741307 (diff) |
Better cron warning message, do not run feed updates when in ajax or web cron mode
Diffstat (limited to 'cron')
-rw-r--r-- | cron/updater.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cron/updater.php b/cron/updater.php index 84aadc8f0..d2c5aaa96 100644 --- a/cron/updater.php +++ b/cron/updater.php @@ -16,7 +16,8 @@ namespace OCA\News\Cron; use OCA\News\AppInfo\Application; use OCA\News\Config\Config; -use \OCA\News\Utility\Updater as UpdaterService; +use OCA\News\Service\StatusService; +use OCA\News\Utility\Updater as UpdaterService; class Updater { @@ -28,7 +29,9 @@ class Updater { // make it possible to turn off cron updates if you use an external // script to execute updates in parallel - if ($container->query(Config::class)->getUseCronUpdates()) { + $useCronUpdates = $container->query(Config::class)->getUseCronUpdates(); + $isProperlyConfigured = $container->query(StatusService::class)->isProperlyConfigured(); + if ($useCronUpdates && $isProperlyConfigured) { $container->query(UpdaterService::class)->update(); $container->query(UpdaterService::class)->beforeUpdate(); $container->query(UpdaterService::class)->afterUpdate(); |