Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-10-19 17:44:28 +0300
committerJoas Schilling <coding@schilljs.com>2018-11-08 17:44:45 +0300
commitbb352fb667e87ea0829f1da5f9e85c34bdefe9fa (patch)
treecd243856dcfec5708528418b55269e3d7feed53a /lib/base.php
parent78fd8ab0fd362fd5d568dfc5b47a02158e62d51c (diff)
Use the defined func()->count() instead of manual counting
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/base.php b/lib/base.php
index 762646fa4c1..90fa5496200 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -312,7 +312,7 @@ class OC {
if ($apps->isInstalled('user_ldap')) {
$qb = \OC::$server->getDatabaseConnection()->getQueryBuilder();
- $result = $qb->selectAlias($qb->createFunction('COUNT(*)'), 'user_count')
+ $result = $qb->select($qb->func()->count('*', 'user_count'))
->from('ldap_user_mapping')
->execute();
$row = $result->fetch();
@@ -323,7 +323,7 @@ class OC {
if (!$tooBig && $apps->isInstalled('user_saml')) {
$qb = \OC::$server->getDatabaseConnection()->getQueryBuilder();
- $result = $qb->selectAlias($qb->createFunction('COUNT(*)'), 'user_count')
+ $result = $qb->select($qb->func()->count('*', 'user_count'))
->from('user_saml_users')
->execute();
$row = $result->fetch();