core/ajax/share.php
Avoid deeply nested control flow statements. Open
Open
if (isset($contact['isSystemBook'])) {
continue;
}
Avoid deeply nested control flow statements. Open
Open
if (!isset($contact['EMAIL'])) {
continue;
}
Avoid deeply nested control flow statements. Open
Open
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[] = [
Avoid deeply nested control flow statements. Open
Open
if (isset($_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP]) &&
\is_array($_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP])) {
$sharedGroups = $_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP];
}
Avoid deeply nested control flow statements. Open
Open
if (!\is_array($emails)) {
$emails = [$emails];
}
Avoid deeply nested control flow statements. Open
Open
if (\substr_count((string)$_GET['search'], '@') >= 1) {
$shareWith[] = [
'label' => (string)$_GET['search'],
'value' => [
'shareType' => \OCP\Share::SHARE_TYPE_REMOTE,
Avoid deeply nested control flow statements. Open
Open
if (\in_array($uid, $sharedUsers)) {
continue;
}
Avoid deeply nested control flow statements. Open
Open
if (isset($_GET['itemShares'][OCP\Share::SHARE_TYPE_USER]) &&
\is_array($_GET['itemShares'][OCP\Share::SHARE_TYPE_USER])) {
$sharedUsers = $_GET['itemShares'][OCP\Share::SHARE_TYPE_USER];
}
Avoid deeply nested control flow statements. Open
Open
if (isset($contact['CLOUD'])) {
foreach ($contact['CLOUD'] as $cloudId) {
$shareWith[] = [
'label' => $contact['FN'] . ' (' . $cloudId . ')',
'value' => [