summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-06-05 17:23:42 +0200
committerVincent Petry <pvince81@owncloud.com>2014-06-05 17:23:42 +0200
commit1c598085176e4bef12f5fbcd221ef6b832b734bb (patch)
treeedf58b2d3ed7e4fa4e187740ecf01485098a792b /core
parent4b650a20a42b70412cee9dd835e096e16da6d530 (diff)
parent6578f00b4bcfbd5bc44bc12e341506f922498d7b (diff)
downloadnextcloud-server-1c598085176e4bef12f5fbcd221ef6b832b734bb.tar.gz
nextcloud-server-1c598085176e4bef12f5fbcd221ef6b832b734bb.zip
Merge pull request #8865 from owncloud/improve_share_settings
Improve share settings
Diffstat (limited to 'core')
-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);