From 8cd52ed36d7b8c6dc9b69dafd6269cdbeb1f6673 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 10 Mar 2016 14:55:31 +0100 Subject: Return the correct group casing in sharee api --- apps/files_sharing/api/sharees.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps') diff --git a/apps/files_sharing/api/sharees.php b/apps/files_sharing/api/sharees.php index 28dfd4af955..88cf783b2a1 100644 --- a/apps/files_sharing/api/sharees.php +++ b/apps/files_sharing/api/sharees.php @@ -223,10 +223,10 @@ class Sharees { foreach ($groups as $gid) { if (strtolower($gid) === $search) { $this->result['exact']['groups'][] = [ - 'label' => $search, + 'label' => $gid, 'value' => [ 'shareType' => Share::SHARE_TYPE_GROUP, - 'shareWith' => $search, + 'shareWith' => $gid, ], ]; } else { -- cgit v1.2.3 From aad8aa0970f0593c213e7ed2baf924878b135393 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 11 Mar 2016 09:11:43 +0100 Subject: Correctly lower the search input as well --- apps/files_sharing/api/sharees.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'apps') diff --git a/apps/files_sharing/api/sharees.php b/apps/files_sharing/api/sharees.php index 88cf783b2a1..718be4dece9 100644 --- a/apps/files_sharing/api/sharees.php +++ b/apps/files_sharing/api/sharees.php @@ -147,8 +147,8 @@ class Sharees { $foundUserById = false; foreach ($users as $uid => $userDisplayName) { - if (strtolower($uid) === $search || strtolower($userDisplayName) === $search) { - if (strtolower($uid) === $search) { + if (strtolower($uid) === strtolower($search) || strtolower($userDisplayName) === strtolower($search)) { + if (strtolower($uid) === strtolower($search)) { $foundUserById = true; } $this->result['exact']['users'][] = [ @@ -221,7 +221,7 @@ class Sharees { } foreach ($groups as $gid) { - if (strtolower($gid) === $search) { + if (strtolower($gid) === strtolower($search)) { $this->result['exact']['groups'][] = [ 'label' => $gid, 'value' => [ @@ -282,8 +282,8 @@ class Sharees { } foreach ($cloudIds as $cloudId) { list(, $serverUrl) = $this->splitUserRemote($cloudId); - if (strtolower($contact['FN']) === $search || strtolower($cloudId) === $search) { - if (strtolower($cloudId) === $search) { + if (strtolower($contact['FN']) === strtolower($search) || strtolower($cloudId) === strtolower($search)) { + if (strtolower($cloudId) === strtolower($search)) { $foundRemoteById = true; } $this->result['exact']['remotes'][] = [ -- cgit v1.2.3