Merge pull request #538 from Deltachaos/fix_537

Fixes update of shared files with mirall because it dose not update all ...
This commit is contained in:
Thomas Müller 2012-11-20 22:55:08 -08:00
commit a85d891938
1 changed files with 7 additions and 5 deletions

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);
}
}
}