diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-19 11:01:00 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-20 19:30:59 +0100 |
commit | da25ed997e25fb31fcb0b1fe992d38992ff071d7 (patch) | |
tree | a1c6620eac8b0b6e6dd48bcb6545b9674f25a268 /lib/private/Updater | |
parent | 2b2626566c19280ff207cbfa2c0c235ecae2a79b (diff) | |
download | nextcloud-server-da25ed997e25fb31fcb0b1fe992d38992ff071d7.tar.gz nextcloud-server-da25ed997e25fb31fcb0b1fe992d38992ff071d7.zip |
Do not check for updates if we have no internet
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/Updater')
-rw-r--r-- | lib/private/Updater/VersionCheck.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/Updater/VersionCheck.php b/lib/private/Updater/VersionCheck.php index 3cbd7061fe0..446e04dc5ed 100644 --- a/lib/private/Updater/VersionCheck.php +++ b/lib/private/Updater/VersionCheck.php @@ -33,7 +33,7 @@ class VersionCheck { /** @var IClientService */ private $clientService; - + /** @var IConfig */ private $config; @@ -54,6 +54,11 @@ class VersionCheck { * @return array|bool */ public function check() { + // If this server is set to have no internet connection this is all not needed + if (!$this->config->getSystemValueBool('has_internet_connection', true)) { + return false; + } + // 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); |