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

@@ -16,7 +16,7 @@ class AbConfig {
}
static public function Get($chan,$xhash,$family,$key) {
static public function Get($chan,$xhash,$family,$key, $default = false) {
$r = q("select * from abconfig where chan = %d and xchan = '%s' and cat = '%s' and k = '%s' limit 1",
intval($chan),
dbesc($xhash),
@@ -26,7 +26,7 @@ class AbConfig {
if($r) {
return ((preg_match('|^a:[0-9]+:{.*}$|s', $r[0]['v'])) ? unserialize($r[0]['v']) : $r[0]['v']);
}
return false;
return $default;
}