summaryrefslogtreecommitdiffstats
path: root/lib/filecache.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-06-23 23:32:44 +0200
committerRobin Appelman <icewind@owncloud.com>2012-06-23 23:32:44 +0200
commitf1e4c845ce9ee215d18a059fd53a13e91fbf9d8c (patch)
treedd44c72fdc72178c3c29b8763901810cea8cb173 /lib/filecache.php
parent1c0e72cd5ac80c4ef80bd22cf3f0a3892807db4c (diff)
downloadnextcloud-server-f1e4c845ce9ee215d18a059fd53a13e91fbf9d8c.tar.gz
nextcloud-server-f1e4c845ce9ee215d18a059fd53a13e91fbf9d8c.zip
fix duplicates showing up in the filecache
Diffstat (limited to 'lib/filecache.php')
-rw-r--r--lib/filecache.php10
1 files 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.'=?';
}
}