summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaximilian Ruta <mr@xtain.net>2012-11-20 23:34:25 +0100
committerMaximilian Ruta <mr@xtain.net>2012-11-20 23:34:25 +0100
commitac4cafcfc7242f45b82c34132529cdcee4c099b9 (patch)
tree17af9fed2ed05b0be890bc201c360cb40ec01d3b
parent486b8013d03e4ba3dfa6f11e5a86498391e8dcea (diff)
downloadnextcloud-server-ac4cafcfc7242f45b82c34132529cdcee4c099b9.tar.gz
nextcloud-server-ac4cafcfc7242f45b82c34132529cdcee4c099b9.zip
Fixes update of shared files with mirall because it dose not update all methadata for a file
-rw-r--r--lib/filecache.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/filecache.php b/lib/filecache.php
index 4a7dbd0250d..f1d6a823c4c 100644
--- a/lib/filecache.php
+++ b/lib/filecache.php
@@ -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);
+ }
}
}