summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/config.sample.php5
-rwxr-xr-xlib/util.php5
2 files changed, 9 insertions, 1 deletions
diff --git a/config/config.sample.php b/config/config.sample.php
index 9b7d8e5c38d..b70b3cf533d 100644
--- a/config/config.sample.php
+++ b/config/config.sample.php
@@ -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 */
diff --git a/lib/util.php b/lib/util.php
index 6630c6a9e1a..37fb1bd9d06 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -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) {