]> source.dussan.org Git - nextcloud-server.git/commitdiff
move check if internet connection is disabled on purpose to a dedicated method
authorGeorg Ehrke <georg@ownCloud.com>
Mon, 27 May 2013 17:19:17 +0000 (19:19 +0200)
committerGeorg Ehrke <georg@ownCloud.com>
Mon, 27 May 2013 17:19:17 +0000 (19:19 +0200)
lib/util.php

index 51f9fcffc435434e7266caa4aeaf38387552657e..5fadb8cb244edeedfd6422856961ade1d16367cf 100755 (executable)
@@ -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