]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fixes update of shared files with mirall because it dose not update all methadata...
authorMaximilian Ruta <mr@xtain.net>
Tue, 20 Nov 2012 22:34:25 +0000 (23:34 +0100)
committerMaximilian Ruta <mr@xtain.net>
Tue, 20 Nov 2012 22:34:25 +0000 (23:34 +0100)
lib/filecache.php

index 4a7dbd0250d68ad1f9ab30eed8c75933588e3f36..f1d6a823c4c5d38a82027dc66739e77810d18e79 100644 (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);
+                       }
                }
        }