From: Michael Date: Wed, 9 Aug 2017 21:34:39 +0000 (+0000) Subject: Just more simplyfication X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=69a3f66d563ea0a006000dc3c64254617976b30c;p=friendica.git Just more simplyfication --- diff --git a/src/Core/Config.php b/src/Core/Config.php index 0cdccb953a..f3c5dc13a1 100644 --- a/src/Core/Config.php +++ b/src/Core/Config.php @@ -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; diff --git a/src/Core/PConfig.php b/src/Core/PConfig.php index e5a852e403..8080573331 100644 --- a/src/Core/PConfig.php +++ b/src/Core/PConfig.php @@ -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;