summaryrefslogtreecommitdiffstats
path: root/lib/files/cache
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@owncloud.com>2013-09-21 02:20:01 +0200
committerAndreas Fischer <bantu@owncloud.com>2013-09-21 02:20:01 +0200
commit2a17025d537c41b9366c9592c985b911d9394337 (patch)
tree3becc24cd04d521079e71be4e985234bf1f5d7d8 /lib/files/cache
parentde2e6e137b3be966622b0b608a3b69f6282e2e56 (diff)
downloadnextcloud-server-2a17025d537c41b9366c9592c985b911d9394337.tar.gz
nextcloud-server-2a17025d537c41b9366c9592c985b911d9394337.zip
Move bool to int conversion to buildParts(), so it also happens for update().
Diffstat (limited to 'lib/files/cache')
-rw-r--r--lib/files/cache/cache.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/files/cache/cache.php b/lib/files/cache/cache.php
index 39e36684b7b..e69733727af 100644
--- a/lib/files/cache/cache.php
+++ b/lib/files/cache/cache.php
@@ -201,7 +201,6 @@ class Cache {
$data['path'] = $file;
$data['parent'] = $this->getParentId($file);
$data['name'] = \OC_Util::basename($file);
- $data['encrypted'] = isset($data['encrypted']) ? ((int)$data['encrypted']) : 0;
list($queryParts, $params) = $this->buildParts($data);
$queryParts[] = '`storage`';
@@ -265,6 +264,9 @@ class Cache {
$params[] = $value;
$queryParts[] = '`mtime`';
}
+ } elseif ($name === 'encrypted') {
+ // Boolean to integer conversion
+ $value = $value ? 1 : 0;
}
$params[] = $value;
$queryParts[] = '`' . $name . '`';