Use getvalue to fetch the value

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2016-11-16 18:52:32 +01:00
parent 2960b97fc7
commit 577a8a730f
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 4 additions and 5 deletions

View 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();