summaryrefslogtreecommitdiffstats
path: root/core/ajax/share.php
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-08-07 23:29:56 +0200
committerBart Visscher <bartv@thisnet.nl>2012-08-07 23:29:56 +0200
commitd4882df8cbb7f7417d098363192824b3a36b53f1 (patch)
tree1c2c1fdab0bf9dd1c0a169777f39cd2857bad7ab /core/ajax/share.php
parent1b5c8ff47175492f3925aea6c6dda3aaf5445cd3 (diff)
downloadnextcloud-server-d4882df8cbb7f7417d098363192824b3a36b53f1.tar.gz
nextcloud-server-d4882df8cbb7f7417d098363192824b3a36b53f1.zip
Fix warnings and better styling
Diffstat (limited to 'core/ajax/share.php')
-rw-r--r--core/ajax/share.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/core/ajax/share.php b/core/ajax/share.php
index 8ca2c637f2c..625199aa0b6 100644
--- a/core/ajax/share.php
+++ b/core/ajax/share.php
@@ -78,7 +78,11 @@ 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 && (!isset($_GET['itemShares']) || !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'])
+ || !isset($_GET['itemShares'][OCP\Share::SHARE_TYPE_CONTACT])
+ || !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']));
}
}
@@ -103,7 +107,11 @@ 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 && (!isset($_GET['itemShares']) || !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'])
+ || !isset($_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP])
+ || !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++;
}