aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvoxsim <Simon Vocella>2014-09-18 17:50:19 +0200
committervoxsim <Simon Vocella>2014-09-18 17:50:19 +0200
commit7a14f94ae5cc8d02d46294ca5079c929877c2fe4 (patch)
tree5462ae2570f656b35a346f1822d79747ee98e9e4
parent1366133d2bba33391b25a57ad0182b317fe3ecb6 (diff)
downloadnextcloud-server-7a14f94ae5cc8d02d46294ca5079c929877c2fe4.tar.gz
nextcloud-server-7a14f94ae5cc8d02d46294ca5079c929877c2fe4.zip
1. remove sizeof($filteredUsers) > 0 as condition
2. use count instead of sizeof. Latter is an alias to first one, practically we stick to count everywhere. Having it consistent helps with readability. 3. move whitespace so we have $groupUsers[] = $filteredUser; instead of $groupUsers []= $filteredUser;
-rw-r--r--lib/private/group/manager.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/group/manager.php b/lib/private/group/manager.php
index e3744ab7698..da598f0c334 100644
--- a/lib/private/group/manager.php
+++ b/lib/private/group/manager.php
@@ -225,11 +225,11 @@ class Manager extends PublicEmitter {
$filteredUsers = $this->userManager->search($search, $searchLimit, $searchOffset);
foreach($filteredUsers as $filteredUser) {
if($group->inGroup($filteredUser)) {
- $groupUsers []= $filteredUser;
+ $groupUsers[]= $filteredUser;
}
}
$searchOffset += $searchLimit;
- } while(sizeof($groupUsers) < $searchLimit+$offset && sizeof($filteredUsers) > 0 && sizeof($filteredUsers) === $searchLimit);
+ } while(count($groupUsers) < $searchLimit+$offset && count($filteredUsers) === $searchLimit);
if($limit === -1) {
$groupUsers = array_slice($groupUsers, $offset);