summaryrefslogtreecommitdiffstats
path: root/lib/private/Updater
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-11-19 11:01:00 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-11-20 19:30:59 +0100
commitda25ed997e25fb31fcb0b1fe992d38992ff071d7 (patch)
treea1c6620eac8b0b6e6dd48bcb6545b9674f25a268 /lib/private/Updater
parent2b2626566c19280ff207cbfa2c0c235ecae2a79b (diff)
downloadnextcloud-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.php7
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);