Just more simplyfication

This commit is contained in:
Michael 2017-08-09 21:34:39 +00:00
parent fce72cbbc8
commit 69a3f66d56
2 changed files with 2 additions and 10 deletions

View file

@ -163,11 +163,7 @@ class Config {
// manage array value
$dbvalue = (is_array($value) ? serialize($value) : $dbvalue);
if (is_null($stored) || !self::$in_db[$family][$key]) {
dba::insert('config', array('cat' => $family, 'k' => $key, 'v' => $dbvalue), true);
} else {
dba::update('config', array('v' => $dbvalue), array('cat' => $family, 'k' => $key), true);
}
dba::update('config', array('v' => $dbvalue), array('cat' => $family, 'k' => $key), true);
if ($ret) {
self::$in_db[$family][$key] = true;

View file

@ -141,11 +141,7 @@ class PConfig {
// manage array value
$dbvalue = (is_array($value) ? serialize($value) : $dbvalue);
if (is_null($stored) || !self::$in_db[$uid][$family][$key]) {
dba::insert('pconfig', array('uid' => $uid, 'cat' => $family, 'k' => $key, 'v' => $dbvalue), true);
} else {
dba::update('pconfig', array('v' => $dbvalue), array('uid' => $uid, 'cat' => $family, 'k' => $key), true);
}
dba::update('pconfig', array('v' => $dbvalue), array('uid' => $uid, 'cat' => $family, 'k' => $key), true);
if ($ret) {
self::$in_db[$uid][$family][$key] = true;