diff options
author | Joas Schilling <coding@schilljs.com> | 2018-10-19 16:44:28 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2018-11-08 15:44:45 +0100 |
commit | bb352fb667e87ea0829f1da5f9e85c34bdefe9fa (patch) | |
tree | cd243856dcfec5708528418b55269e3d7feed53a /apps/dav/lib/CalDAV | |
parent | 78fd8ab0fd362fd5d568dfc5b47a02158e62d51c (diff) | |
download | nextcloud-server-bb352fb667e87ea0829f1da5f9e85c34bdefe9fa.tar.gz nextcloud-server-bb352fb667e87ea0829f1da5f9e85c34bdefe9fa.zip |
Use the defined func()->count() instead of manual counting
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/dav/lib/CalDAV')
-rw-r--r-- | apps/dav/lib/CalDAV/CalDavBackend.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index 60f163abcbf..187ba4ecdcf 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -213,7 +213,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription public function getCalendarsForUserCount($principalUri, $excludeBirthday = true) { $principalUri = $this->convertPrincipal($principalUri, true); $query = $this->db->getQueryBuilder(); - $query->select($query->createFunction('COUNT(*)')) + $query->select($query->func()->count('*')) ->from('calendars') ->where($query->expr()->eq('principaluri', $query->createNamedParameter($principalUri))); @@ -1045,7 +1045,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription $extraData = $this->getDenormalizedData($calendarData); $q = $this->db->getQueryBuilder(); - $q->select($q->createFunction('COUNT(*)')) + $q->select($q->func()->count('*')) ->from('calendarobjects') ->where($q->expr()->eq('calendarid', $q->createNamedParameter($calendarId))) ->andWhere($q->expr()->eq('uid', $q->createNamedParameter($extraData['uid']))) |