@@ -236,17 +236,17 @@ discard block |
||
236 | 236 | $this->result['groups'] = $this->result['exact']['groups'] = []; |
237 | 237 | |
238 | 238 | $groups = $this->groupManager->search($search, $this->limit, $this->offset); |
239 | - $groupIds = array_map(function (IGroup $group) { return $group->getGID(); }, $groups); |
|
239 | + $groupIds = array_map(function(IGroup $group) { return $group->getGID(); }, $groups); |
|
240 | 240 | |
241 | 241 | if (!$this->shareeEnumeration || sizeof($groups) < $this->limit) { |
242 | 242 | $this->reachedEndFor[] = 'groups'; |
243 | 243 | } |
244 | 244 | |
245 | - $userGroups = []; |
|
245 | + $userGroups = []; |
|
246 | 246 | if (!empty($groups) && $this->shareWithGroupOnly) { |
247 | 247 | // Intersect all the groups that match with the groups this user is a member of |
248 | 248 | $userGroups = $this->groupManager->getUserGroups($this->userSession->getUser()); |
249 | - $userGroups = array_map(function (IGroup $group) { return $group->getGID(); }, $userGroups); |
|
249 | + $userGroups = array_map(function(IGroup $group) { return $group->getGID(); }, $userGroups); |
|
250 | 250 | $groupIds = array_intersect($groupIds, $userGroups); |
251 | 251 | } |
252 | 252 | |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | $result['exactIdMatch'] = true; |
348 | 348 | } |
349 | 349 | $result['exact'][] = [ |
350 | - 'label' => $contact['FN'] . " ($cloudId)", |
|
350 | + 'label' => $contact['FN']." ($cloudId)", |
|
351 | 351 | 'value' => [ |
352 | 352 | 'shareType' => Share::SHARE_TYPE_REMOTE, |
353 | 353 | 'shareWith' => $cloudId, |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | ]; |
357 | 357 | } else { |
358 | 358 | $result['results'][] = [ |
359 | - 'label' => $contact['FN'] . " ($cloudId)", |
|
359 | + 'label' => $contact['FN']." ($cloudId)", |
|
360 | 360 | 'value' => [ |
361 | 361 | 'shareType' => Share::SHARE_TYPE_REMOTE, |
362 | 362 | 'shareWith' => $cloudId, |
@@ -440,13 +440,13 @@ discard block |
||
440 | 440 | public function search($search = '', $itemType = null, $page = 1, $perPage = 200, $shareType = null, $lookup = true) { |
441 | 441 | |
442 | 442 | // only search for string larger than a given threshold |
443 | - $threshold = (int)$this->config->getSystemValue('sharing.minSearchStringLength', 0); |
|
443 | + $threshold = (int) $this->config->getSystemValue('sharing.minSearchStringLength', 0); |
|
444 | 444 | if (strlen($search) < $threshold) { |
445 | 445 | return new DataResponse($this->result); |
446 | 446 | } |
447 | 447 | |
448 | 448 | // never return more than the max. number of results configured in the config.php |
449 | - $maxResults = (int)$this->config->getSystemValue('sharing.maxAutocompleteResults', 0); |
|
449 | + $maxResults = (int) $this->config->getSystemValue('sharing.maxAutocompleteResults', 0); |
|
450 | 450 | if ($maxResults > 0) { |
451 | 451 | $perPage = min($perPage, $maxResults); |
452 | 452 | } |
@@ -624,7 +624,7 @@ discard block |
||
624 | 624 | |
625 | 625 | if (!$this->hasUserInResult($cloud->getUser())) { |
626 | 626 | $this->result['exact']['users'][] = [ |
627 | - 'label' => $contact['FN'] . " ($emailAddress)", |
|
627 | + 'label' => $contact['FN']." ($emailAddress)", |
|
628 | 628 | 'value' => [ |
629 | 629 | 'shareType' => Share::SHARE_TYPE_USER, |
630 | 630 | 'shareWith' => $cloud->getUser(), |
@@ -643,7 +643,7 @@ discard block |
||
643 | 643 | |
644 | 644 | if (!$this->hasUserInResult($cloud->getUser())) { |
645 | 645 | $this->result['users'][] = [ |
646 | - 'label' => $contact['FN'] . " ($emailAddress)", |
|
646 | + 'label' => $contact['FN']." ($emailAddress)", |
|
647 | 647 | 'value' => [ |
648 | 648 | 'shareType' => Share::SHARE_TYPE_USER, |
649 | 649 | 'shareWith' => $cloud->getUser(), |
@@ -659,7 +659,7 @@ discard block |
||
659 | 659 | $result['exactIdMatch'] = true; |
660 | 660 | } |
661 | 661 | $result['exact'][] = [ |
662 | - 'label' => $contact['FN'] . " ($emailAddress)", |
|
662 | + 'label' => $contact['FN']." ($emailAddress)", |
|
663 | 663 | 'value' => [ |
664 | 664 | 'shareType' => Share::SHARE_TYPE_EMAIL, |
665 | 665 | 'shareWith' => $emailAddress, |
@@ -667,7 +667,7 @@ discard block |
||
667 | 667 | ]; |
668 | 668 | } else { |
669 | 669 | $result['results'][] = [ |
670 | - 'label' => $contact['FN'] . " ($emailAddress)", |
|
670 | + 'label' => $contact['FN']." ($emailAddress)", |
|
671 | 671 | 'value' => [ |
672 | 672 | 'shareType' => Share::SHARE_TYPE_EMAIL, |
673 | 673 | 'shareWith' => $emailAddress, |
@@ -703,11 +703,11 @@ discard block |
||
703 | 703 | $lookupServerUrl = rtrim($lookupServerUrl, '/'); |
704 | 704 | $result = []; |
705 | 705 | |
706 | - if($isEnabled === 'yes') { |
|
706 | + if ($isEnabled === 'yes') { |
|
707 | 707 | try { |
708 | 708 | $client = $this->clientService->newClient(); |
709 | 709 | $response = $client->get( |
710 | - $lookupServerUrl . '/users?search=' . urlencode($search), |
|
710 | + $lookupServerUrl.'/users?search='.urlencode($search), |
|
711 | 711 | [ |
712 | 712 | 'timeout' => 10, |
713 | 713 | 'connect_timeout' => 3, |
@@ -764,12 +764,12 @@ discard block |
||
764 | 764 | */ |
765 | 765 | protected function getPaginationLink($page, array $params) { |
766 | 766 | if ($this->isV2()) { |
767 | - $url = $this->urlGenerator->getAbsoluteURL('/ocs/v2.php/apps/files_sharing/api/v1/sharees') . '?'; |
|
767 | + $url = $this->urlGenerator->getAbsoluteURL('/ocs/v2.php/apps/files_sharing/api/v1/sharees').'?'; |
|
768 | 768 | } else { |
769 | - $url = $this->urlGenerator->getAbsoluteURL('/ocs/v1.php/apps/files_sharing/api/v1/sharees') . '?'; |
|
769 | + $url = $this->urlGenerator->getAbsoluteURL('/ocs/v1.php/apps/files_sharing/api/v1/sharees').'?'; |
|
770 | 770 | } |
771 | 771 | $params['page'] = $page + 1; |
772 | - $link = '<' . $url . http_build_query($params) . '>; rel="next"'; |
|
772 | + $link = '<'.$url.http_build_query($params).'>; rel="next"'; |
|
773 | 773 | |
774 | 774 | return $link; |
775 | 775 | } |