aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Config.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-12-05 14:50:34 -0800
committerzotlabs <mike@macgirvin.com>2016-12-05 14:50:34 -0800
commitfbf13dde213dcecfdc6c6e5d95b165bb46eda85a (patch)
tree61d1e5fef7b9569b71b1a39ea6be5bec35b800d7 /Zotlabs/Lib/Config.php
parentbdd713413abaf85f2cb8de86ef9c4032f8a91bd5 (diff)
downloadvolse-hubzilla-fbf13dde213dcecfdc6c6e5d95b165bb46eda85a.tar.gz
volse-hubzilla-fbf13dde213dcecfdc6c6e5d95b165bb46eda85a.tar.bz2
volse-hubzilla-fbf13dde213dcecfdc6c6e5d95b165bb46eda85a.zip
minor changes to config api and markdown_to_bb
Diffstat (limited to 'Zotlabs/Lib/Config.php')
-rw-r--r--Zotlabs/Lib/Config.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/Zotlabs/Lib/Config.php b/Zotlabs/Lib/Config.php
index d4ee1aeda..5625a3f79 100644
--- a/Zotlabs/Lib/Config.php
+++ b/Zotlabs/Lib/Config.php
@@ -98,13 +98,13 @@ class Config {
* @return mixed Return value or false on error or if not set
*/
- static public function Get($family,$key) {
+ static public function Get($family,$key,$default = false) {
if((! array_key_exists($family, \App::$config)) || (! array_key_exists('config_loaded', \App::$config[$family])))
self::Load($family);
if(array_key_exists('config_loaded', \App::$config[$family])) {
if(! array_key_exists($key, \App::$config[$family])) {
- return false;
+ return $default;
}
return ((! is_array(\App::$config[$family][$key])) && (preg_match('|^a:[0-9]+:{.*}$|s', \App::$config[$family][$key]))
? unserialize(\App::$config[$family][$key])
@@ -112,7 +112,7 @@ class Config {
);
}
- return false;
+ return $default;
}
/**