Skip to content
Snippets Groups Projects
Commit 2a17025d authored by Andreas Fischer's avatar Andreas Fischer
Browse files

Move bool to int conversion to buildParts(), so it also happens for update().

parent de2e6e13
No related branches found
No related tags found
No related merge requests found
......@@ -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 . '`';
......
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