summaryrefslogtreecommitdiffstats
path: root/core/ajax
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-06-04 11:07:31 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-06-05 15:49:34 +0200
commit6578f00b4bcfbd5bc44bc12e341506f922498d7b (patch)
tree6ef948934965edb35a6852ca75144848844b7722 /core/ajax
parentcf9099c7885453bcf15e40cbed722f432dffa1fb (diff)
downloadnextcloud-server-6578f00b4bcfbd5bc44bc12e341506f922498d7b.tar.gz
nextcloud-server-6578f00b4bcfbd5bc44bc12e341506f922498d7b.zip
unify share settings
Diffstat (limited to 'core/ajax')
-rw-r--r--core/ajax/share.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/ajax/share.php b/core/ajax/share.php
index 75b749a5b07..feb64490b4e 100644
--- a/core/ajax/share.php
+++ b/core/ajax/share.php
@@ -236,7 +236,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
break;
case 'getShareWith':
if (isset($_GET['search'])) {
- $sharePolicy = OC_Appconfig::getValue('core', 'shareapi_share_policy', 'global');
+ $shareWithinGroupOnly = OC\Share\Share::shareWithGroupMembersOnly();
$shareWith = array();
// if (OC_App::isEnabled('contacts')) {
// // TODO Add function to contacts to only get the 'fullname' column to improve performance
@@ -256,7 +256,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
// }
// }
$groups = OC_Group::getGroups($_GET['search']);
- if ($sharePolicy == 'groups_only') {
+ if ($shareWithinGroupOnly) {
$usergroups = OC_Group::getUserGroups(OC_User::getUser());
$groups = array_intersect($groups, $usergroups);
}
@@ -266,7 +266,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
$offset = 0;
while ($count < 15 && count($users) == $limit) {
$limit = 15 - $count;
- if ($sharePolicy == 'groups_only') {
+ if ($shareWithinGroupOnly) {
$users = OC_Group::DisplayNamesInGroups($usergroups, $_GET['search'], $limit, $offset);
} else {
$users = OC_User::getDisplayNames($_GET['search'], $limit, $offset);