diff options
author | Sean Molenaar <sean@seanmolenaar.eu> | 2020-09-20 22:03:05 +0200 |
---|---|---|
committer | Benjamin Brahmer <info@b-brahmer.de> | 2020-09-25 19:18:04 +0200 |
commit | 60ab4941cc7e6ede095e9e4aee3c2bf9a5c3bff6 (patch) | |
tree | baf0b07dd1c545efeb59437af46a99f4d9f69425 /lib/Service/StatusService.php | |
parent | 2c8b4fa019749113658b9ed8cae211b679e4cbc0 (diff) |
Move to nextcloud config and update phpunit
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
Diffstat (limited to 'lib/Service/StatusService.php')
-rw-r--r-- | lib/Service/StatusService.php | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/Service/StatusService.php b/lib/Service/StatusService.php index 85be58a5d..f926258b6 100644 --- a/lib/Service/StatusService.php +++ b/lib/Service/StatusService.php @@ -13,17 +13,14 @@ namespace OCA\News\Service; +use OCA\News\AppInfo\Application; use OCP\IConfig; use OCP\IDBConnection; -use OCA\News\Config\Config; - class StatusService { /** @var IConfig */ private $settings; - /** @var Config */ - private $config; /** @var string */ private $appName; /** @var IDBConnection */ @@ -32,22 +29,21 @@ class StatusService public function __construct( IConfig $settings, IDBConnection $connection, - Config $config, $AppName ) { $this->settings = $settings; - $this->config = $config; $this->appName = $AppName; $this->connection = $connection; } public function isProperlyConfigured() { - $cronMode = $this->settings->getAppValue( - 'core', - 'backgroundjobs_mode' + $cronMode = $this->settings->getSystemValue('backgroundjobs_mode'); + $cronOff = !$this->settings->getAppValue( + Application::NAME, + 'useCronUpdates', + Application::DEFAULT_SETTINGS['useCronUpdates'] ); - $cronOff = !$this->config->getUseCronUpdates(); // check for cron modes which may lead to problems return $cronMode === 'cron' || $cronOff; |