summaryrefslogtreecommitdiffstats
path: root/lib/private/util.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-10-01 15:37:55 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-10-01 15:37:55 +0200
commitb2dd5cb61655b6ca82e8fd1fb117b42301d28c2b (patch)
tree98e25e54bcefd00d0169cbf18cf930bce17228d3 /lib/private/util.php
parent64994facce890e53a50bc75047e502e434c9c749 (diff)
downloadnextcloud-server-b2dd5cb61655b6ca82e8fd1fb117b42301d28c2b.tar.gz
nextcloud-server-b2dd5cb61655b6ca82e8fd1fb117b42301d28c2b.zip
save excluded groups in json format - fixes #10983
Diffstat (limited to 'lib/private/util.php')
-rw-r--r--lib/private/util.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/util.php b/lib/private/util.php
index 9abaef71a68..746a2e09523 100644
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -223,7 +223,12 @@ class OC_Util {
if (\OC::$server->getAppConfig()->getValue('core', 'shareapi_exclude_groups', 'no') === 'yes') {
$user = \OCP\User::getUser();
$groupsList = \OC::$server->getAppConfig()->getValue('core', 'shareapi_exclude_groups_list', '');
- $excludedGroups = explode(',', $groupsList);
+ $excludedGroups = json_decode($groupsList);
+ if (is_null($excludedGroups)) {
+ $excludedGroups = explode(',', $groupsList);
+ $newValue = json_encode($excludedGroups);
+ \OC::$server->getAppConfig()->setValue('core', 'shareapi_exclude_groups_list', $newValue);
+ }
$usersGroups = \OC_Group::getUserGroups($user);
if (!empty($usersGroups)) {
$remainingGroups = array_diff($usersGroups, $excludedGroups);