fix setting array values to config items

pull/310/head
Tobias Diekershoff 2012-05-22 11:56:49 +02:00
parent 2320a3e549
commit 5dad99888d
1 changed files with 1 additions and 3 deletions

View File

@ -77,11 +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($value) ? intval($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' ) ",