summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-11-16 18:52:32 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2016-11-16 18:52:49 +0100
commit577a8a730f79bf3605f5826fbd1affe16747e3f7 (patch)
tree1aba579d7e7301660b28854cf8f73e5ef1b08549 /lib
parent2960b97fc728e9212c63f49cb46fa119853a4e26 (diff)
downloadnextcloud-server-577a8a730f79bf3605f5826fbd1affe16747e3f7.tar.gz
nextcloud-server-577a8a730f79bf3605f5826fbd1affe16747e3f7.zip
Use getvalue to fetch the value
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/AllConfig.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/private/AllConfig.php b/lib/private/AllConfig.php
index cd1d5f69ac1..4e13d70371b 100644
--- a/lib/private/AllConfig.php
+++ b/lib/private/AllConfig.php
@@ -215,13 +215,12 @@ class AllConfig implements \OCP\IConfig {
// TODO - FIXME
$this->fixDIInit();
- // warm up the cache to avoid updating the value if it is already set to this value before
- $this->getUserValue($userId, $appName, $key);
+ $prevValue = $this->getUserValue($userId, $appName, $key, null);
- if (isset($this->userCache[$userId][$appName][$key])) {
- if ($this->userCache[$userId][$appName][$key] === (string)$value) {
+ if ($prevValue !== null) {
+ if ($prevValue === (string)$value) {
return;
- } else if ($preCondition !== null && $this->userCache[$userId][$appName][$key] !== (string)$preCondition) {
+ } else if ($preCondition !== null && $prevValue !== (string)$preCondition) {
throw new PreConditionNotMetException();
} else {
$qb = $this->connection->getQueryBuilder();