]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(updatenotification): Skip update check
authorChristopher Ng <chrng8@gmail.com>
Fri, 11 Aug 2023 02:01:07 +0000 (19:01 -0700)
committerChristopher Ng <chrng8@gmail.com>
Fri, 11 Aug 2023 17:40:49 +0000 (10:40 -0700)
Signed-off-by: Christopher Ng <chrng8@gmail.com>
apps/updatenotification/lib/Notification/BackgroundJob.php

index 4889c931238bc2ea9befed9b57e0b665adf18e02..08142d5b00bccaf8894eb21285e4bbf13ea1eefd 100644 (file)
@@ -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.