summaryrefslogtreecommitdiffstats
path: root/utility
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-04-10 17:06:22 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-04-10 17:06:27 +0200
commitdb545b430a513e7fda3fba5859972b6c550958b5 (patch)
tree581622a85ab84b214c7c75c4996d2321e2d92571 /utility
parent47954580d994611883167bfb6cb4bb18837bbb1c (diff)
add proxy settings to config
Diffstat (limited to 'utility')
-rw-r--r--utility/config.php35
1 files changed, 34 insertions, 1 deletions
diff --git a/utility/config.php b/utility/config.php
index 193411592..92d0b9daf 100644
--- a/utility/config.php
+++ b/utility/config.php
@@ -39,6 +39,9 @@ class Config {
private $simplePieCacheDuration; // seconds
private $feedFetcherTimeout; // seconds
private $useCronUpdates; // turn off updates run by owncloud cronjob
+ private $proxyHost;
+ private $proxyPort;
+ private $proxyPassword;
private $api;
@@ -50,8 +53,22 @@ class Config {
$this->feedFetcherTimeout = 60;
$this->useCronUpdates = true;
$this->api = $api;
+ $this->proxyHost = '';
+ $this->proxyPort = 8080;
+ $this->proxyPassword = '';
}
+ public function getProxyPort() {
+ return $this->proxyPort;
+ }
+
+ public function getProxyHost() {
+ return $this->proxyHost;
+ }
+
+ public function getProxyPassword() {
+ return $this->proxyPassword;
+ }
public function getAutoPurgeMinimumInterval() {
return $this->autoPurgeMinimumInterval;
@@ -103,6 +120,19 @@ class Config {
}
+ public function setProxyPort($value) {
+ $this->proxyPort = $value;
+ }
+
+ public function setProxyHost($value) {
+ $this->proxyHost = $value;
+ }
+
+ public function setProxyPassword($value) {
+ $this->proxyPassword = $value;
+ }
+
+
public function read($configPath, $createIfNotExists=false) {
if($createIfNotExists && !$this->fileSystem->file_exists($configPath)) {
@@ -139,7 +169,10 @@ class Config {
"autoPurgeCount = " . $this->autoPurgeCount . "\n" .
"simplePieCacheDuration = " . $this->simplePieCacheDuration . "\n" .
"feedFetcherTimeout = " . $this->feedFetcherTimeout . "\n" .
- "useCronUpdates = " . var_export($this->useCronUpdates, true)
+ "useCronUpdates = " . var_export($this->useCronUpdates, true) . "\n" .
+ "proxyHost = " . $this->proxyHost . "\n" .
+ "proxyPort = " . $this->proxyPort . "\n" .
+ "proxyPassword = " . $this->proxyPassword;
;
$this->fileSystem->file_put_contents($configPath, $ini);