summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2016-05-09 11:25:58 +0200
committerVincent Petry <pvince81@owncloud.com>2016-05-13 16:15:07 +0200
commit9a80ea4eed76218b87f1f21bca8297badd6a2f4e (patch)
treec4bffc596b8c8d3b20774cf8fa32852aff5345d7 /lib
parent63769d54c36eb0f824bc937cd3985b2e7242a127 (diff)
downloadnextcloud-server-9a80ea4eed76218b87f1f21bca8297badd6a2f4e.tar.gz
nextcloud-server-9a80ea4eed76218b87f1f21bca8297badd6a2f4e.zip
Make update server URL configurable
Currently testing the updates is a big problem and not really super easy possible. Since we now have a new updater server we should also make this configurable so that people can properly test updates.
Diffstat (limited to 'lib')
-rw-r--r--lib/private/updater.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/private/updater.php b/lib/private/updater.php
index 8f4b81cec65..1b0764c8e1f 100644
--- a/lib/private/updater.php
+++ b/lib/private/updater.php
@@ -127,19 +127,16 @@ class Updater extends BasicEmitter {
/**
* Check if a new version is available
*
- * @param string $updaterUrl the url to check, i.e. 'http://apps.owncloud.com/updater.php'
* @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());