From efb2e692300452f4a82f4136d595c6cdb0e33a9f Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Wed, 22 May 2013 12:21:11 +0200 Subject: fix return value of OC_Util::isinternetconnectionworking() --- lib/util.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/util.php') diff --git a/lib/util.php b/lib/util.php index 48c224a3034..51f9fcffc43 100755 --- a/lib/util.php +++ b/lib/util.php @@ -644,7 +644,7 @@ class OC_Util { // 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; + return false; } // try to connect to owncloud.org to see if http connections to the internet are possible. -- cgit v1.2.3 From 58c9175a567fe8db0a3ed4711d8360526d3cdaf8 Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Mon, 27 May 2013 19:19:17 +0200 Subject: move check if internet connection is disabled on purpose to a dedicated method --- lib/util.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib/util.php') diff --git a/lib/util.php b/lib/util.php index 51f9fcffc43..5fadb8cb244 100755 --- a/lib/util.php +++ b/lib/util.php @@ -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; } @@ -666,6 +665,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 -- cgit v1.2.3 From d69b7e24d288f08bb7ebc73d46772a2939a0f31f Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Mon, 27 May 2013 19:20:29 +0200 Subject: update comment --- lib/util.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/util.php') diff --git a/lib/util.php b/lib/util.php index 5fadb8cb244..76309942cc3 100755 --- a/lib/util.php +++ b/lib/util.php @@ -641,7 +641,7 @@ 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 + // in case there is no internet connection on purpose return false if (self::isinternetconnectionenabled() === false) { return false; } -- cgit v1.2.3 From 557cc4c1ab29c005ab13b8bbefed108a928679a8 Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Mon, 27 May 2013 19:24:31 +0200 Subject: make method names camelCase --- lib/util.php | 6 +++--- settings/admin.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/util.php') diff --git a/lib/util.php b/lib/util.php index 76309942cc3..40075ef7774 100755 --- a/lib/util.php +++ b/lib/util.php @@ -640,9 +640,9 @@ class OC_Util { /** * Check if the ownCloud server can connect to the internet */ - public static function isinternetconnectionworking() { + public static function isInternetconnectionWorking() { // in case there is no internet connection on purpose return false - if (self::isinternetconnectionenabled() === false) { + if (self::isInternetconnectionEnabled() === false) { return false; } @@ -669,7 +669,7 @@ class OC_Util { /** * Check if the connection to the internet is disabled on purpose */ - public static function isinternetconnectionenabled(){ + public static function isInternetconnectionEnabled(){ return \OC_Config::getValue("has_internet_connection", true); } diff --git a/settings/admin.php b/settings/admin.php index 1f6c7ed37da..67c7cdaa61f 100755 --- a/settings/admin.php +++ b/settings/admin.php @@ -24,7 +24,7 @@ $tmpl->assign('loglevel', OC_Config::getValue( "loglevel", 2 )); $tmpl->assign('entries', $entries); $tmpl->assign('entriesremain', $entriesremain); $tmpl->assign('htaccessworking', $htaccessworking); -$tmpl->assign('internetconnectionworking', OC_Util::isinternetconnectionenabled() ? OC_Util::isinternetconnectionworking() : 0); +$tmpl->assign('internetconnectionworking', OC_Util::isInternetconnectionEnabled() ? OC_Util::isInternetconnectionWorking() : 0); $tmpl->assign('islocaleworking', OC_Util::issetlocaleworking()); $tmpl->assign('isWebDavWorking', OC_Util::isWebDAVWorking()); $tmpl->assign('has_fileinfo', OC_Util::fileInfoLoaded()); -- cgit v1.2.3 From dd4a07321a2afa5c86fa4e42fc3e133b4ec91791 Mon Sep 17 00:00:00 2001 From: Thomas Mueller Date: Fri, 31 May 2013 23:24:09 +0200 Subject: fix method naming --- lib/util.php | 6 +++--- settings/admin.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/util.php') diff --git a/lib/util.php b/lib/util.php index 40075ef7774..f1f91085154 100755 --- a/lib/util.php +++ b/lib/util.php @@ -640,9 +640,9 @@ class OC_Util { /** * Check if the ownCloud server can connect to the internet */ - public static function isInternetconnectionWorking() { + public static function isInternetConnectionWorking() { // in case there is no internet connection on purpose return false - if (self::isInternetconnectionEnabled() === false) { + if (self::isInternetConnectionEnabled() === false) { return false; } @@ -669,7 +669,7 @@ class OC_Util { /** * Check if the connection to the internet is disabled on purpose */ - public static function isInternetconnectionEnabled(){ + public static function isInternetConnectionEnabled(){ return \OC_Config::getValue("has_internet_connection", true); } diff --git a/settings/admin.php b/settings/admin.php index c2be9aec879..db041ef889c 100755 --- a/settings/admin.php +++ b/settings/admin.php @@ -24,7 +24,7 @@ $tmpl->assign('loglevel', OC_Config::getValue( "loglevel", 2 )); $tmpl->assign('entries', $entries); $tmpl->assign('entriesremain', $entriesremain); $tmpl->assign('htaccessworking', $htaccessworking); -$tmpl->assign('internetconnectionworking', OC_Util::isInternetconnectionEnabled() ? OC_Util::isInternetconnectionWorking() : false); +$tmpl->assign('internetconnectionworking', OC_Util::isInternetConnectionEnabled() ? OC_Util::isInternetConnectionWorking() : false); $tmpl->assign('islocaleworking', OC_Util::issetlocaleworking()); $tmpl->assign('isWebDavWorking', OC_Util::isWebDAVWorking()); $tmpl->assign('has_fileinfo', OC_Util::fileInfoLoaded()); -- cgit v1.2.3