From f1e4c845ce9ee215d18a059fd53a13e91fbf9d8c Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sat, 23 Jun 2012 23:32:44 +0200 Subject: [PATCH] fix duplicates showing up in the filecache --- lib/filecache.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/filecache.php b/lib/filecache.php index b61068e7954..68f1aa8fe6b 100644 --- a/lib/filecache.php +++ b/lib/filecache.php @@ -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.'=?'; } } -- 2.39.5