Skip to content
Snippets Groups Projects
Unverified Commit 577a8a73 authored by Roeland Jago Douma's avatar Roeland Jago Douma
Browse files

Use getvalue to fetch the value

parent 2960b97f
No related branches found
No related tags found
No related merge requests found
...@@ -215,13 +215,12 @@ class AllConfig implements \OCP\IConfig { ...@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment