summaryrefslogtreecommitdiffstats
path: root/lib/Service/FeedService.php
diff options
context:
space:
mode:
authorSean Molenaar <sean@seanmolenaar.eu>2020-09-20 22:03:05 +0200
committerBenjamin Brahmer <info@b-brahmer.de>2020-09-25 19:18:04 +0200
commit60ab4941cc7e6ede095e9e4aee3c2bf9a5c3bff6 (patch)
treebaf0b07dd1c545efeb59437af46a99f4d9f69425 /lib/Service/FeedService.php
parent2c8b4fa019749113658b9ed8cae211b679e4cbc0 (diff)
Move to nextcloud config and update phpunit
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
Diffstat (limited to 'lib/Service/FeedService.php')
-rw-r--r--lib/Service/FeedService.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/Service/FeedService.php b/lib/Service/FeedService.php
index aff9626d8..6d57c8027 100644
--- a/lib/Service/FeedService.php
+++ b/lib/Service/FeedService.php
@@ -16,6 +16,8 @@ namespace OCA\News\Service;
use FeedIo\Reader\ReadErrorException;
use HTMLPurifier;
+use OCA\News\AppInfo\Application;
+use OCP\IConfig;
use OCP\ILogger;
use OCP\IL10N;
use OCP\AppFramework\Db\DoesNotExistException;
@@ -25,7 +27,6 @@ use OCA\News\Db\Item;
use OCA\News\Db\FeedMapper;
use OCA\News\Db\ItemMapper;
use OCA\News\Fetcher\Fetcher;
-use OCA\News\Config\Config;
use OCA\News\Utility\Time;
class FeedService extends Service
@@ -48,9 +49,8 @@ class FeedService extends Service
ILogger $logger,
IL10N $l10n,
Time $timeFactory,
- Config $config,
- HTMLPurifier $purifier,
- $LoggerParameters
+ IConfig $config,
+ HTMLPurifier $purifier
) {
parent::__construct($feedMapper);
$this->feedFetcher = $feedFetcher;
@@ -58,11 +58,14 @@ class FeedService extends Service
$this->logger = $logger;
$this->l10n = $l10n;
$this->timeFactory = $timeFactory;
- $this->autoPurgeMinimumInterval = $config->getAutoPurgeMinimumInterval(
+ $this->autoPurgeMinimumInterval = $config->getAppValue(
+ Application::NAME,
+ 'autoPurgeMinimumInterval',
+ Application::DEFAULT_SETTINGS['autoPurgeMinimumInterval']
);
$this->purifier = $purifier;
$this->feedMapper = $feedMapper;
- $this->loggerParams = $LoggerParameters;
+ $this->loggerParams = ['app' => Application::NAME];
}
/**