summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2023-08-10 19:01:07 -0700
committerChristopher Ng <chrng8@gmail.com>2023-08-11 16:31:36 -0700
commit0c3324f478d54a062d3d27529c870c8f095d5cd3 (patch)
treec356d51ff9b91941412bf2542d510a7b3e4cd770
parentacd4e5dc0fc23c2e53c90525492bbe8218c15323 (diff)
downloadnextcloud-server-0c3324f478d54a062d3d27529c870c8f095d5cd3.tar.gz
nextcloud-server-0c3324f478d54a062d3d27529c870c8f095d5cd3.zip
fix(updatenotification): Skip update check
Signed-off-by: Christopher Ng <chrng8@gmail.com> (cherry picked from commit b63dbae68aa1b5430f186aee5fcce55db711abc4)
-rw-r--r--apps/updatenotification/lib/Notification/BackgroundJob.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/updatenotification/lib/Notification/BackgroundJob.php b/apps/updatenotification/lib/Notification/BackgroundJob.php
index 4889c931238..08142d5b00b 100644
--- a/apps/updatenotification/lib/Notification/BackgroundJob.php
+++ b/apps/updatenotification/lib/Notification/BackgroundJob.php
@@ -57,6 +57,11 @@ class BackgroundJob extends TimedJob {
}
protected function run($argument) {
+ // Do not check for updates if not connected to the internet
+ if (!$this->config->getSystemValueBool('has_internet_connection', true)) {
+ return;
+ }
+
if (\OC::$CLI && !$this->config->getSystemValueBool('debug', false)) {
try {
// Jitter the pinging of the updater server and the appstore a bit.