From bb352fb667e87ea0829f1da5f9e85c34bdefe9fa Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 19 Oct 2018 16:44:28 +0200 Subject: Use the defined func()->count() instead of manual counting Signed-off-by: Joas Schilling --- apps/files_sharing/lib/Command/CleanupRemoteStorages.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/files_sharing/lib/Command') diff --git a/apps/files_sharing/lib/Command/CleanupRemoteStorages.php b/apps/files_sharing/lib/Command/CleanupRemoteStorages.php index 2175982dfc1..a4e5f50b9b2 100644 --- a/apps/files_sharing/lib/Command/CleanupRemoteStorages.php +++ b/apps/files_sharing/lib/Command/CleanupRemoteStorages.php @@ -98,7 +98,7 @@ class CleanupRemoteStorages extends Command { public function countFiles($numericId, OutputInterface $output) { $queryBuilder = $this->connection->getQueryBuilder(); - $queryBuilder->select($queryBuilder->createFunction('COUNT(' . $queryBuilder->getColumnName('fileid') . ')')) + $queryBuilder->select($queryBuilder->func()->count('fileid')) ->from('filecache') ->where($queryBuilder->expr()->eq( 'storage', -- cgit v1.2.3