]> git.mxchange.org Git - friendica.git/blobdiff - include/config.php
keep FB out of private notes
[friendica.git] / include / config.php
index 92694f51932c3d9f2358b7b6778dc1af1a403d86..12fc9cafc99b61699fe172d635673277ff79b2fd 100644 (file)
@@ -77,10 +77,9 @@ function get_config($family, $key, $instore = false) {
 if(! function_exists('set_config')) {
 function set_config($family,$key,$value) {
        global $a;
-       
        // manage array value
        $dbvalue = (is_array($value)?serialize($value):$value);
-
+       $dbvalue = (is_bool($dbvalue) ? intval($dbvalue) : $dbvalue);
        if(get_config($family,$key,true) === false) {
                $a->config[$family][$key] = $value;
                $ret = q("INSERT INTO `config` ( `cat`, `k`, `v` ) VALUES ( '%s', '%s', '%s' ) ",
@@ -162,7 +161,7 @@ function del_config($family,$key) {
        if(x($a->config[$family],$key))
                unset($a->config[$family][$key]);
        $ret = q("DELETE FROM `config` WHERE `cat` = '%s' AND `k` = '%s' LIMIT 1",
-               dbesc($cat),
+               dbesc($family),
                dbesc($key)
        );
        return $ret;