diff options
author | Robin Appelman <robin@icewind.nl> | 2023-02-08 11:46:37 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2023-05-11 17:30:03 +0200 |
commit | 7ad3574d71e0565438753cf94878723b540ae54f (patch) | |
tree | b6c9ac714981b7f58c6890ef905124ee54b580a9 /lib/private/Group | |
parent | e4b9ecd8f2d5f98c2f67cf31c151909c81075653 (diff) | |
download | nextcloud-server-7ad3574d71e0565438753cf94878723b540ae54f.tar.gz nextcloud-server-7ad3574d71e0565438753cf94878723b540ae54f.zip |
also update groupinterface and database backend
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Group')
-rw-r--r-- | lib/private/Group/Database.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/private/Group/Database.php b/lib/private/Group/Database.php index 569cfa5007f..edfc76ef836 100644 --- a/lib/private/Group/Database.php +++ b/lib/private/Group/Database.php @@ -266,7 +266,7 @@ class Database extends ABackend implements * * Returns a list with all groups */ - public function getGroups($search = '', $limit = null, $offset = null) { + public function getGroups(string $search = '', int $limit = -1, int $offset = 0) { $this->fixDI(); $query = $this->dbConn->getQueryBuilder(); @@ -283,8 +283,12 @@ class Database extends ABackend implements ))); } - $query->setMaxResults($limit) - ->setFirstResult($offset); + if (!$limit > 0) { + $query->setMaxResults($limit); + } + if ($offset > 0) { + $query->setFirstResult($offset); + } $result = $query->execute(); $groups = []; |