Use getvalue to fetch the value
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
2960b97fc7
commit
577a8a730f
|
@ -215,13 +215,12 @@ class AllConfig implements \OCP\IConfig {
|
||||||
// TODO - FIXME
|
// TODO - FIXME
|
||||||
$this->fixDIInit();
|
$this->fixDIInit();
|
||||||
|
|
||||||
// warm up the cache to avoid updating the value if it is already set to this value before
|
$prevValue = $this->getUserValue($userId, $appName, $key, null);
|
||||||
$this->getUserValue($userId, $appName, $key);
|
|
||||||
|
|
||||||
if (isset($this->userCache[$userId][$appName][$key])) {
|
if ($prevValue !== null) {
|
||||||
if ($this->userCache[$userId][$appName][$key] === (string)$value) {
|
if ($prevValue === (string)$value) {
|
||||||
return;
|
return;
|
||||||
} else if ($preCondition !== null && $this->userCache[$userId][$appName][$key] !== (string)$preCondition) {
|
} else if ($preCondition !== null && $prevValue !== (string)$preCondition) {
|
||||||
throw new PreConditionNotMetException();
|
throw new PreConditionNotMetException();
|
||||||
} else {
|
} else {
|
||||||
$qb = $this->connection->getQueryBuilder();
|
$qb = $this->connection->getQueryBuilder();
|
||||||
|
|
Loading…
Reference in New Issue