]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix duplicates showing up in the filecache
authorRobin Appelman <icewind@owncloud.com>
Sat, 23 Jun 2012 21:32:44 +0000 (23:32 +0200)
committerRobin Appelman <icewind@owncloud.com>
Sat, 23 Jun 2012 21:32:44 +0000 (23:32 +0200)
lib/filecache.php

index b61068e795493a50b48a4ffef568afe90e263182..68f1aa8fe6ba333a76c0cbb5ff7e991e747df473 100644 (file)
@@ -86,7 +86,7 @@ class OC_FileCache{
                }
                $path=$root.$path;
                $parent=self::getParentId($path);
-               $id=self::getId($path,'');
+               $id=self::getFileId($path);
                if(isset(OC_FileCache::$savedData[$path])){
                        $data=array_merge(OC_FileCache::$savedData[$path],$data);
                        unset(OC_FileCache::$savedData[$path]);
@@ -130,9 +130,11 @@ class OC_FileCache{
                foreach(array('size','mtime','ctime','mimetype','encrypted','versioned','writable') as $attribute){
                        if(isset($data[$attribute])){
                                //Convert to int it args are false
-                               if($data[$attribute] === false) $arguments[] = 0;
-                               else $arguments[] = $data[$attribute];
-                               $arguments[]=$data[$attribute];
+                               if($data[$attribute] === false){
+                                       $arguments[] = 0;
+                               }else{
+                                       $arguments[] = $data[$attribute];
+                               }
                                $queryParts[]=$attribute.'=?';
                        }
                }