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

This commit is contained in:
Andreas Fischer 2013-09-21 02:20:01 +02:00
parent de2e6e137b
commit 2a17025d53

View file

@ -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 . '`';