summaryrefslogtreecommitdiffstats
path: root/controller/admincontroller.php
diff options
context:
space:
mode:
Diffstat (limited to 'controller/admincontroller.php')
-rw-r--r--controller/admincontroller.php90
1 files changed, 45 insertions, 45 deletions
diff --git a/controller/admincontroller.php b/controller/admincontroller.php
index 2b876c394..cd3ae9df4 100644
--- a/controller/admincontroller.php
+++ b/controller/admincontroller.php
@@ -21,56 +21,56 @@ use \OCA\News\Config\Config;
class AdminController extends Controller {
- private $config;
- private $configPath;
+ private $config;
+ private $configPath;
- public function __construct($appName, IRequest $request, Config $config,
- $configPath){
- parent::__construct($appName, $request);
- $this->config = $config;
- $this->configPath = $configPath;
- }
+ public function __construct($appName, IRequest $request, Config $config,
+ $configPath){
+ parent::__construct($appName, $request);
+ $this->config = $config;
+ $this->configPath = $configPath;
+ }
- // There are no checks for the index method since the output is rendered
- // in admin/admin.php
- public function index() {
- $data = [
- 'autoPurgeMinimumInterval' => $this->config->getAutoPurgeMinimumInterval(),
- 'autoPurgeCount' => $this->config->getAutoPurgeCount(),
- 'cacheDuration' => $this->config->getSimplePieCacheDuration(),
- 'feedFetcherTimeout' => $this->config->getFeedFetcherTimeout(),
- 'useCronUpdates' => $this->config->getUseCronUpdates(),
- ];
- return new TemplateResponse($this->appName, 'admin', $data, 'blank');
- }
+ // There are no checks for the index method since the output is rendered
+ // in admin/admin.php
+ public function index() {
+ $data = [
+ 'autoPurgeMinimumInterval' => $this->config->getAutoPurgeMinimumInterval(),
+ 'autoPurgeCount' => $this->config->getAutoPurgeCount(),
+ 'cacheDuration' => $this->config->getSimplePieCacheDuration(),
+ 'feedFetcherTimeout' => $this->config->getFeedFetcherTimeout(),
+ 'useCronUpdates' => $this->config->getUseCronUpdates(),
+ ];
+ return new TemplateResponse($this->appName, 'admin', $data, 'blank');
+ }
- /**
- * @param int $autoPurgeMinimumInterval
- * @param int $autoPurgeCount
- * @param int $cacheDuration
- * @param int $feedFetcherTimeout
- * @param bool $useCronUpdates
- * @return array with the updated values
- */
- public function update($autoPurgeMinimumInterval, $autoPurgeCount,
- $cacheDuration, $feedFetcherTimeout,
- $useCronUpdates) {
- $this->config->setAutoPurgeMinimumInterval($autoPurgeMinimumInterval);
- $this->config->setAutoPurgeCount($autoPurgeCount);
- $this->config->setSimplePieCacheDuration($cacheDuration);
- $this->config->setFeedFetcherTimeout($feedFetcherTimeout);
- $this->config->setUseCronUpdates($useCronUpdates);
- $this->config->write($this->configPath);
+ /**
+ * @param int $autoPurgeMinimumInterval
+ * @param int $autoPurgeCount
+ * @param int $cacheDuration
+ * @param int $feedFetcherTimeout
+ * @param bool $useCronUpdates
+ * @return array with the updated values
+ */
+ public function update($autoPurgeMinimumInterval, $autoPurgeCount,
+ $cacheDuration, $feedFetcherTimeout,
+ $useCronUpdates) {
+ $this->config->setAutoPurgeMinimumInterval($autoPurgeMinimumInterval);
+ $this->config->setAutoPurgeCount($autoPurgeCount);
+ $this->config->setSimplePieCacheDuration($cacheDuration);
+ $this->config->setFeedFetcherTimeout($feedFetcherTimeout);
+ $this->config->setUseCronUpdates($useCronUpdates);
+ $this->config->write($this->configPath);
- return [
- 'autoPurgeMinimumInterval' => $this->config->getAutoPurgeMinimumInterval(),
- 'autoPurgeCount' => $this->config->getAutoPurgeCount(),
- 'cacheDuration' => $this->config->getSimplePieCacheDuration(),
- 'feedFetcherTimeout' => $this->config->getFeedFetcherTimeout(),
- 'useCronUpdates' => $this->config->getUseCronUpdates(),
- ];
- }
+ return [
+ 'autoPurgeMinimumInterval' => $this->config->getAutoPurgeMinimumInterval(),
+ 'autoPurgeCount' => $this->config->getAutoPurgeCount(),
+ 'cacheDuration' => $this->config->getSimplePieCacheDuration(),
+ 'feedFetcherTimeout' => $this->config->getFeedFetcherTimeout(),
+ 'useCronUpdates' => $this->config->getUseCronUpdates(),
+ ];
+ }
} \ No newline at end of file