]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use the default parameter of OC_Config::getValue to set defaults
authorBart Visscher <bartv@thisnet.nl>
Thu, 7 Jun 2012 20:49:50 +0000 (22:49 +0200)
committerBart Visscher <bartv@thisnet.nl>
Thu, 7 Jun 2012 20:49:50 +0000 (22:49 +0200)
lib/ocsclient.php

index 33308553be02eb632eca7ecfb19186d04a75ac22..8e976171e937468182c7df2d00d26ea5bedd8032 100644 (file)
@@ -35,12 +35,7 @@ class OC_OCSClient{
         * This function returns the url of the OCS AppStore server. It´s possible to set it in the config file or it will fallback to the default
         */
        private static function getAppStoreURL(){
-               $configurl=OC_Config::getValue('appstoreurl', '');
-               if($configurl<>'') {
-                       $url=$configurl;
-               }else{
-                       $url='http://api.apps.owncloud.com/v1';
-               }
+               $url = OC_Config::getValue('appstoreurl', 'http://api.apps.owncloud.com/v1');
                return($url);
        }
 
@@ -50,12 +45,7 @@ class OC_OCSClient{
          * This function returns the url of the OCS knowledge base server. It´s possible to set it in the config file or it will fallback to the default
          */
         private static function getKBURL(){
-                $configurl=OC_Config::getValue('knowledgebaseurl', '');
-                if($configurl<>'') {
-                        $url=$configurl;
-                }else{
-                        $url='http://api.apps.owncloud.com/v1';
-                }
+                $url = OC_Config::getValue('knowledgebaseurl', 'http://api.apps.owncloud.com/v1');
                 return($url);
         }