summaryrefslogtreecommitdiffstats
path: root/core/ajax
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-01-28 15:58:40 +0100
committerBjörn Schießle <schiessle@owncloud.com>2013-01-28 15:58:40 +0100
commit590c4aa710077ae82a5af0ec4477a00eafe791dc (patch)
treeed959d130878f45242276d13da0fca398da1157b /core/ajax
parentc00b66fe5bb37403e4dec1ede9d509947b795df0 (diff)
downloadnextcloud-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.php2
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++;