Just more simplyfication
This commit is contained in:
parent
fce72cbbc8
commit
69a3f66d56
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user