diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-05 11:30:27 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-05 11:30:38 +0100 |
commit | 95530f62513a82c385d9378b4a59da57d74092d9 (patch) | |
tree | a4d17994548999b42e99371f381da8c256ee39bf /config | |
parent | 57163ad25a7dc63abd8aff8663c185ddad398466 (diff) |
update picofeed, add max size setting, fix #642
Diffstat (limited to 'config')
-rw-r--r-- | config/config.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/config/config.php b/config/config.php index 8b11f0bd9..9cdfa1b0c 100644 --- a/config/config.php +++ b/config/config.php @@ -29,6 +29,7 @@ class Config { private $useCronUpdates; // turn off updates run by owncloud cronjob private $logger; private $loggerParams; + private $maxSize; public function __construct($fileSystem, ILogger $logger, $loggerParams) { @@ -36,6 +37,7 @@ class Config { $this->autoPurgeMinimumInterval = 60; $this->autoPurgeCount = 200; $this->maxRedirects = 10; + $this->maxSize = 100*1024*1024; // 100Mb $this->feedFetcherTimeout = 60; $this->useCronUpdates = true; $this->logger = $logger; @@ -99,6 +101,11 @@ class Config { } + public function getMaxSize() { + return $this->maxSize; + } + + public function setAutoPurgeMinimumInterval($value) { $this->autoPurgeMinimumInterval = $value; } @@ -128,19 +135,27 @@ class Config { $this->proxyPort = $value; } + public function setProxyHost($value) { $this->proxyHost = $value; } + public function setProxyUser($value) { $this->proxyUser = $value; } + public function setProxyPassword($value) { $this->proxyPassword = $value; } + public function setMaxSize($value) { + $this->maxSize = $value; + } + + public function read($configPath, $createIfNotExists=false) { if($createIfNotExists && !$this->fileSystem->file_exists($configPath)) { @@ -185,6 +200,8 @@ class Config { $this->autoPurgeCount . "\n" . 'maxRedirects = ' . $this->maxRedirects . "\n" . + 'maxSize = ' . + $this->maxSize . "\n" . 'feedFetcherTimeout = ' . $this->feedFetcherTimeout . "\n" . 'useCronUpdates = ' . |