Works now

This commit is contained in:
Michael 2017-08-09 06:16:19 +00:00
parent ae8098eaf2
commit 64718b53d1
2 changed files with 3 additions and 2 deletions

View file

@ -98,7 +98,7 @@ class Config {
}
$ret = dba::select('config', array('v'), array('cat' => $family, 'k' => $key),
array("order" => array("cat", "k"), 'limit' => 1));
array("order" => array("cat", "k"), 'limit' => 1));
if (dbm::is_result($ret)) {
// manage array value
$val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret['v']) ? unserialize($ret['v']) : $ret['v']);
@ -205,6 +205,7 @@ class Config {
}
$ret = dba::delete('config', array('cat' => $family, 'k' => $key));
return $ret;
}
}

View file

@ -92,7 +92,7 @@ class PConfig {
$ret = dba::select('pconfig', array('v'), array('uid' => $uid, 'cat' => $family, 'k' => $key),
array("order" => array('uid', 'cat', 'k'), 'limit' => 1));
if (dbm::is_result($ret)) {
$val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret[0]['v']) ? unserialize($ret[0]['v']) : $ret[0]['v']);
$val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret['v']) ? unserialize($ret['v']) : $ret['v']);
$a->config[$uid][$family][$key] = $val;
self::$in_db[$uid][$family][$key] = true;