]> git.mxchange.org Git - friendica.git/blobdiff - include/config.php
Fallback for empty names
[friendica.git] / include / config.php
index 8f36dbdc825cecdbbf4d58ffbc15baf1b8fdc7d5..c51db4ec7b1f7fc9f550bdf3818014553a5e9ec1 100644 (file)
@@ -1,8 +1,4 @@
 <?php
-
-require_once("include/PConfig.php");
-require_once("include/Config.php");
-
 /**
  * @file include/config.php
  * 
@@ -16,6 +12,9 @@ require_once("include/Config.php");
  * configurations need to be fixed as of 10/08/2011.
  */
 
+use \Friendica\Core\Config;
+use \Friendica\Core\PConfig;
+
 /**
  * @brief (Deprecated) Loads all configuration values of family into a cached storage.
  *
@@ -44,10 +43,7 @@ function load_config($family) {
  * @return mixed Stored value or false if it does not exist
  */
 function get_config($family, $key, $refresh = false) {
-       $v = Config::get($family, $key, $refresh);
-       if(is_null($v))
-               $v = false;
-
+       $v = Config::get($family, $key, false, $refresh);
        return $v;
 }
 
@@ -115,10 +111,7 @@ function load_pconfig($uid,$family) {
  * @return mixed Stored value or false if it does not exist
  */
 function get_pconfig($uid, $family, $key, $refresh = false) {
-       $v = PConfig::get($uid, $family, $key, $refresh);
-       if(is_null($v))
-               $v = false;
-
+       $v = PConfig::get($uid, $family, $key, false, $refresh);
        return $v;
 }