Fixes update of shared files with mirall because it dose not update all methadata for a file

This commit is contained in:
Maximilian Ruta 2012-11-20 23:34:25 +01:00
parent 486b8013d0
commit ac4cafcfc7

View file

@ -137,11 +137,13 @@ class OC_FileCache{
}
$arguments[]=$id;
$sql = 'UPDATE `*PREFIX*fscache` SET '.implode(' , ', $queryParts).' WHERE `id`=?';
$query=OC_DB::prepare($sql);
$result=$query->execute($arguments);
if(OC_DB::isError($result)) {
OC_Log::write('files', 'error while updating file('.$id.') in cache', OC_Log::ERROR);
if(!empty($queryParts)) {
$sql = 'UPDATE `*PREFIX*fscache` SET '.implode(' , ', $queryParts).' WHERE `id`=?';
$query=OC_DB::prepare($sql);
$result=$query->execute($arguments);
if(OC_DB::isError($result)) {
OC_Log::write('files', 'error while updating file('.$id.') in cache', OC_Log::ERROR);
}
}
}