]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use getvalue to fetch the value 2147/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Wed, 16 Nov 2016 17:52:32 +0000 (18:52 +0100)
committerRoeland Jago Douma <roeland@famdouma.nl>
Wed, 16 Nov 2016 17:52:49 +0000 (18:52 +0100)
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
lib/private/AllConfig.php

index cd1d5f69ac11f327d66622b63ca628fcddb612e3..4e13d70371b7fd526b0c9ce8d11c03b7cf7ad663 100644 (file)
@@ -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();