mirror of
https://github.com/friendica/friendica
synced 2024-12-24 00:00:25 +00:00
bugfix marking of db-values
This commit is contained in:
parent
b47fc97b06
commit
8d56fb8fbe
1 changed files with 7 additions and 3 deletions
|
@ -49,15 +49,19 @@ class JITPConfigAdapter extends AbstractDbaConfigAdapter implements IPConfigAdap
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @param bool $mark if true, mark the selection of the current cat/key pair
|
||||
*/
|
||||
public function get($uid, $cat, $key)
|
||||
public function get($uid, $cat, $key, $mark = true)
|
||||
{
|
||||
if (!$this->isConnected()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// The value was in the db, so don't check it again (unless you have to)
|
||||
$this->in_db[$uid][$cat][$key] = true;
|
||||
if ($mark) {
|
||||
$this->in_db[$uid][$cat][$key] = true;
|
||||
}
|
||||
|
||||
$pconfig = DBA::selectFirst('pconfig', ['v'], ['uid' => $uid, 'cat' => $cat, 'k' => $key]);
|
||||
if (DBA::isResult($pconfig)) {
|
||||
|
@ -86,7 +90,7 @@ class JITPConfigAdapter extends AbstractDbaConfigAdapter implements IPConfigAdap
|
|||
// The exception are array values.
|
||||
$dbvalue = (!is_array($value) ? (string)$value : $value);
|
||||
|
||||
$stored = $this->get($uid, $cat, $key);
|
||||
$stored = $this->get($uid, $cat, $key, false);
|
||||
|
||||
if (!isset($this->in_db[$uid])) {
|
||||
$this->in_db[$uid] = [];
|
||||
|
|
Loading…
Reference in a new issue