diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-07 14:34:29 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-07 14:34:29 -0400 |
commit | 0ddfc94cf54fbcdd6f9b172bd5abee495af60577 (patch) | |
tree | e0aa0ea22ca128cdace663041b183dff70311716 /core | |
parent | 5e2ef1e91870893910ecf798583905aa52a62f2e (diff) | |
download | nextcloud-server-0ddfc94cf54fbcdd6f9b172bd5abee495af60577.tar.gz nextcloud-server-0ddfc94cf54fbcdd6f9b172bd5abee495af60577.zip |
Try to fix last commit
Diffstat (limited to 'core')
-rw-r--r-- | core/ajax/share.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/ajax/share.php b/core/ajax/share.php index 0af4da63f88..8a41466a248 100644 --- a/core/ajax/share.php +++ b/core/ajax/share.php @@ -78,7 +78,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['item'] $vcards = OC_Contacts_VCard::all($id); foreach ($vcards as $vcard) { $contact = $vcard['fullname']; - if (stripos($contact, $_GET['search']) !== false && (!is_array($_GET['itemShares'][OCP\Share::SHARE_TYPE_CONTACT]) || !in_array($contact, $_GET['itemShares'][OCP\Share::SHARE_TYPE_CONTACT]))) { + if (stripos($contact, $_GET['search']) !== false && (!isset($_GET['itemShares']) || !is_array($_GET['itemShares'][OCP\Share::SHARE_TYPE_CONTACT]) || !in_array($contact, $_GET['itemShares'][OCP\Share::SHARE_TYPE_CONTACT]))) { $shareWith[] = array('label' => $contact, 'value' => array('shareType' => 5, 'shareWith' => $vcard['id'])); } } @@ -93,7 +93,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['item'] $users = OC_User::getUsers($_GET['search'], $limit, $offset); $offset += $limit; foreach ($users as $user) { - if ((!is_array($_GET['itemShares'][OCP\Share::SHARE_TYPE_USER]) || !in_array($user, $_GET['itemShares'][OCP\Share::SHARE_TYPE_USER])) && $user != OC_User::getUser()) { + if ((!isset($_GET['itemShares']) || !is_array($_GET['itemShares'][OCP\Share::SHARE_TYPE_USER]) || !in_array($user, $_GET['itemShares'][OCP\Share::SHARE_TYPE_USER])) && $user != OC_User::getUser()) { $shareWith[] = array('label' => $user, 'value' => array('shareType' => OCP\Share::SHARE_TYPE_USER, 'shareWith' => $user)); $count++; } @@ -103,7 +103,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['item'] $groups = OC_Group::getUserGroups(OC_User::getUser()); foreach ($groups as $group) { if ($count < 4) { - if (stripos($group, $_GET['search']) !== false && (!is_array($_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP]) || !in_array($group, $_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP]))) { + if (stripos($group, $_GET['search']) !== false && (!isset($_GET['itemShares']) || !is_array($_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP]) || !in_array($group, $_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP]))) { $shareWith[] = array('label' => $group.' (group)', 'value' => array('shareType' => OCP\Share::SHARE_TYPE_GROUP, 'shareWith' => $group)); $count++; } |