diff options
author | Maximilian Ruta <mr@xtain.net> | 2012-11-20 23:34:25 +0100 |
---|---|---|
committer | Maximilian Ruta <mr@xtain.net> | 2012-11-20 23:34:25 +0100 |
commit | ac4cafcfc7242f45b82c34132529cdcee4c099b9 (patch) | |
tree | 17af9fed2ed05b0be890bc201c360cb40ec01d3b | |
parent | 486b8013d03e4ba3dfa6f11e5a86498391e8dcea (diff) | |
download | nextcloud-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.php | 12 |
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); + } } } |