diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-01-28 15:58:40 +0100 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-01-28 15:58:40 +0100 |
commit | 590c4aa710077ae82a5af0ec4477a00eafe791dc (patch) | |
tree | ed959d130878f45242276d13da0fca398da1157b /core/ajax | |
parent | c00b66fe5bb37403e4dec1ede9d509947b795df0 (diff) | |
download | nextcloud-server-590c4aa710077ae82a5af0ec4477a00eafe791dc.tar.gz nextcloud-server-590c4aa710077ae82a5af0ec4477a00eafe791dc.zip |
search display name instead of uid; fix key/value order for array access
Diffstat (limited to 'core/ajax')
-rw-r--r-- | core/ajax/share.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/ajax/share.php b/core/ajax/share.php index 231cdc5e242..6704a00c5a2 100644 --- a/core/ajax/share.php +++ b/core/ajax/share.php @@ -164,7 +164,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo $users = OC_User::getDisplayNames($_GET['search'], $limit, $offset); } $offset += $limit; - foreach ($users as $displayName => $uid) { + foreach ($users as $uid => $displayName) { if ((!isset($_GET['itemShares']) || !is_array($_GET['itemShares'][OCP\Share::SHARE_TYPE_USER]) || !in_array($uid, $_GET['itemShares'][OCP\Share::SHARE_TYPE_USER])) && $uid != OC_User::getUser()) { $shareWith[] = array('label' => $displayName, 'value' => array('shareType' => OCP\Share::SHARE_TYPE_USER, 'shareWith' => $uid)); $count++; |