diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-05-31 17:05:45 -0700 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-05-31 17:05:45 -0700 |
commit | 1b3c9fe5ae8f0767580c38250fd852a2622176b4 (patch) | |
tree | 7665a87c72f8ce04bc1b13e814598252ce31e058 /lib/util.php | |
parent | 3013c027676379ff7156aa400f0d002e269a5104 (diff) | |
parent | dd4a07321a2afa5c86fa4e42fc3e133b4ec91791 (diff) | |
download | nextcloud-server-1b3c9fe5ae8f0767580c38250fd852a2622176b4.tar.gz nextcloud-server-1b3c9fe5ae8f0767580c38250fd852a2622176b4.zip |
Merge pull request #3454 from owncloud/fix_hasInternetConnection
isinternetconnectionworking should return false if OC_Config::getValue("has_internet_connection") is false
Diffstat (limited to 'lib/util.php')
-rwxr-xr-x | lib/util.php | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/util.php b/lib/util.php index b5fbb49e308..035815c057f 100755 --- a/lib/util.php +++ b/lib/util.php @@ -644,11 +644,10 @@ class OC_Util { /** * Check if the ownCloud server can connect to the internet */ - 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; + public static function isInternetConnectionWorking() { + // in case there is no internet connection on purpose return false + if (self::isInternetConnectionEnabled() === false) { + return false; } // try to connect to owncloud.org to see if http connections to the internet are possible. @@ -670,6 +669,13 @@ class OC_Util { } } + + /** + * Check if the connection to the internet is disabled on purpose + */ + public static function isInternetConnectionEnabled(){ + return \OC_Config::getValue("has_internet_connection", true); + } /** * clear all levels of output buffering |