move check if internet connection is disabled on purpose to a dedicated method

This commit is contained in:
Georg Ehrke 2013-05-27 19:19:17 +02:00
parent efb2e69230
commit 58c9175a56
1 changed files with 8 additions and 2 deletions

View File

@ -641,9 +641,8 @@ 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)) {
if (self::isinternetconnectionenabled() === false) {
return false;
}
@ -667,6 +666,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
*/