]> source.dussan.org Git - nextcloud-server.git/commitdiff
Move bool to int conversion to buildParts(), so it also happens for update().
authorAndreas Fischer <bantu@owncloud.com>
Sat, 21 Sep 2013 00:20:01 +0000 (02:20 +0200)
committerAndreas Fischer <bantu@owncloud.com>
Sat, 21 Sep 2013 00:20:01 +0000 (02:20 +0200)
lib/files/cache/cache.php

index 39e36684b7ba1a4bc878e6253cb61081fd2a7e30..e69733727af88bcf869bb51e3cdec7dbe3da4e3f 100644 (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 . '`';