summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2012-11-20 22:55:08 -0800
committerThomas Müller <thomas.mueller@tmit.eu>2012-11-20 22:55:08 -0800
commita85d891938475fa375c9056fbd58885077091404 (patch)
treeafd67ece95f56ba9f5bebd6a7b5e54dab8fb8c1f /lib
parent9204be827b92d9b0e16a9bb59d1bf72f19065e27 (diff)
parentac4cafcfc7242f45b82c34132529cdcee4c099b9 (diff)
downloadnextcloud-server-a85d891938475fa375c9056fbd58885077091404.tar.gz
nextcloud-server-a85d891938475fa375c9056fbd58885077091404.zip
Merge pull request #538 from Deltachaos/fix_537
Fixes update of shared files with mirall because it dose not update all ...
Diffstat (limited to 'lib')
-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);
+ }
}
}