diff --git a/src/app/resource/controllers/ResController.php b/src/app/resource/controllers/ResController.php index b6ce8c3c4c01cb0c58d09d945b4f50f610fcd9bc..551d33ae69446ccd39f37c2936080f0f864f1ca3 100755 --- a/src/app/resource/controllers/ResController.php +++ b/src/app/resource/controllers/ResController.php @@ -215,7 +215,7 @@ class ResController extends ResourceControlController ]); $entities = array_column($entities, 'id'); $folders = FolderModel::getWithEntitiesAndResources([ - 'select' => ['resources_folders.folder_id'], + 'select' => ['distinct(resources_folders.folder_id)'], 'where' => ['resources_folders.res_id = ?', '(entities_folders.entity_id in (?) OR folders.user_id = ?)'], 'data' => [$args['resId'], $entities, $GLOBALS['id']] ]);