]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use Query builder function
authorJoas Schilling <coding@schilljs.com>
Fri, 6 Nov 2020 07:44:46 +0000 (08:44 +0100)
committerJoas Schilling <coding@schilljs.com>
Fri, 6 Nov 2020 11:13:22 +0000 (12:13 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/Files/Cache/Propagator.php

index 53e56c37735070513cf50f963aba35112565f69a..97eaa839ccfd035c424e7f7fd7d219ee4d9c5b00 100644 (file)
@@ -168,7 +168,7 @@ class Propagator implements IPropagator {
                $storageId = (int)$this->storage->getStorageCache()->getNumericId();
 
                $query->update('filecache')
-                       ->set('mtime', $query->createFunction('GREATEST(' . $query->getColumnName('mtime') . ', ' . $query->createParameter('time') . ')'))
+                       ->set('mtime', $query->func()->greatest('mtime', $query->createParameter('time')))
                        ->set('etag', $query->expr()->literal(uniqid()))
                        ->where($query->expr()->eq('storage', $query->expr()->literal($storageId, IQueryBuilder::PARAM_INT)))
                        ->andWhere($query->expr()->eq('path_hash', $query->createParameter('hash')));