minor changes to config api and markdown_to_bb

This commit is contained in:
zotlabs
2016-12-05 14:50:34 -08:00
parent bdd713413a
commit fbf13dde21
8 changed files with 32 additions and 30 deletions

View File

@@ -67,16 +67,16 @@ class PConfig {
* @return mixed Stored value or false if it does not exist
*/
static public function Get($uid,$family,$key,$instore = false) {
static public function Get($uid,$family,$key,$default = false) {
if(is_null($uid) || $uid === false)
return false;
return $default;
if(! array_key_exists($uid, \App::$config))
self::Load($uid);
if((! array_key_exists($family, \App::$config[$uid])) || (! array_key_exists($key, \App::$config[$uid][$family])))
return false;
return $default;
return ((! is_array(\App::$config[$uid][$family][$key])) && (preg_match('|^a:[0-9]+:{.*}$|s', \App::$config[$uid][$family][$key]))
? unserialize(\App::$config[$uid][$family][$key])