]> source.dussan.org Git - nextcloud-server.git/commitdiff
fixes #2789 - no internet connectivity check if there is non on purpose
authorThomas Mueller <thomas.mueller@tmit.eu>
Mon, 8 Apr 2013 20:41:20 +0000 (22:41 +0200)
committerThomas Mueller <thomas.mueller@tmit.eu>
Mon, 8 Apr 2013 20:41:20 +0000 (22:41 +0200)
config/config.sample.php
lib/util.php

index 9b7d8e5c38da6eb8f196dc5216ba010a0785bb11..b70b3cf533dd0720ede8321b6423fa142f0c4f8e 100644 (file)
@@ -126,7 +126,10 @@ $CONFIG = array(
 /* Check if ownCloud is up to date */
 "updatechecker" => true,
 
-/* Place to log to, can be owncloud and syslog (owncloud is log menu item in admin menu) */
+/* Are we connected to the internet or are we running in a closed network? */
+"has_internet_connection" => true,
+
+       /* Place to log to, can be owncloud and syslog (owncloud is log menu item in admin menu) */
 "log_type" => "owncloud",
 
 /* File for the owncloud logger to log to, (default is ownloud.log in the data dir */
index 6630c6a9e1ab9e3650c52f58bcb4047d70b8913d..37fb1bd9d06f1bfd9cad971da4ecec525d28b4e5 100755 (executable)
@@ -635,6 +635,11 @@ class OC_Util {
         */
        public static function isinternetconnectionworking() {
 
+               // in case there is no internet connection on purpose there is no need to display a warning
+               if (!\OC_Config::getValue("has_internet_connection", true)) {
+                       return true;
+               }
+
                // try to connect to owncloud.org to see if http connections to the internet are possible.
                $connected = @fsockopen("www.owncloud.org", 80);
                if ($connected) {