diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-13 19:51:07 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-13 19:51:07 +0100 |
commit | 101e4465776cbdb6313470eb4d5bfd48bdfa163d (patch) | |
tree | 0c62617adbce5fd05ad7797437d1ea38b19a9926 /apps | |
parent | e415af68af3feec3fca325300544b47275e4de89 (diff) | |
parent | 722188e5030bbce6a00a455115db516d08e4e54d (diff) | |
download | nextcloud-server-101e4465776cbdb6313470eb4d5bfd48bdfa163d.tar.gz nextcloud-server-101e4465776cbdb6313470eb4d5bfd48bdfa163d.zip |
Merge pull request #23091 from owncloud/issue-23085-csae-insensitive-group-search
Return the correct group casing in sharee api
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/api/sharees.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/files_sharing/api/sharees.php b/apps/files_sharing/api/sharees.php index 28dfd4af955..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,12 +221,12 @@ class Sharees { } foreach ($groups as $gid) { - if (strtolower($gid) === $search) { + if (strtolower($gid) === strtolower($search)) { $this->result['exact']['groups'][] = [ - 'label' => $search, + 'label' => $gid, 'value' => [ 'shareType' => Share::SHARE_TYPE_GROUP, - 'shareWith' => $search, + 'shareWith' => $gid, ], ]; } else { @@ -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'][] = [ |