diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-05-17 11:09:49 +0300 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-05-17 11:09:49 +0300 |
commit | 8cee246880fdd652807c973aaadc535ee328258a (patch) | |
tree | c817b4288f10e7a73af1dd851dff82de4ff0df18 /lib | |
parent | 42c782f35c5b269cb585d456edd05470731dc628 (diff) | |
parent | 642099ba324d93a39fbae904e15b6405ea732114 (diff) |
Merge pull request #24515 from owncloud/stable8-updater-server-configurable
[stable8] Make update server URL configurable
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/updater.php | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/private/updater.php b/lib/private/updater.php index 6ceff8dd934..60010f27d6a 100644 --- a/lib/private/updater.php +++ b/lib/private/updater.php @@ -98,19 +98,16 @@ class Updater extends BasicEmitter { /** * Check if a new version is available * - * @param string $updaterUrl the url to check, i.e. 'https://updates.owncloud.com/server/' * @return array|bool */ - public function check($updaterUrl = null) { + public function check() { // Look up the cache - it is invalidated all 30 minutes if (((int)$this->config->getAppValue('core', 'lastupdatedat') + 1800) > time()) { return json_decode($this->config->getAppValue('core', 'lastupdateResult'), true); } - if (is_null($updaterUrl)) { - $updaterUrl = 'https://updates.owncloud.com/server/'; - } + $updaterUrl = $this->config->getSystemValue('updater.server.url', 'https://updates.owncloud.com/server/'); $this->config->setAppValue('core', 'lastupdatedat', time()); |