mirror of
https://github.com/verdigado/organization_folders.git
synced 2024-12-06 11:22:41 +01:00
reference organization folder by id not groupfolder id (same id, different nomenclature)
This commit is contained in:
parent
efca199c7f
commit
949e1a42d1
5 changed files with 15 additions and 11 deletions
|
@ -52,17 +52,17 @@ class ResourceMapper extends QBMapper {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param int $groupfolderId
|
||||
* @param int $organizationFolderId
|
||||
* @param int $parentResourceId
|
||||
* @return array
|
||||
*/
|
||||
public function findAll(int $groupfolderId, ?int $parentResourceId = null): array {
|
||||
public function findAll(int $organizationFolderId, ?int $parentResourceId = null): array {
|
||||
/* @var $qb IQueryBuilder */
|
||||
$qb = $this->db->getQueryBuilder();
|
||||
|
||||
$qb->select('resource.*', 'folder.members_acl_permission', 'folder.managers_acl_permission', 'folder.inherited_acl_permission')
|
||||
->from(self::RESOURCES_TABLE, "resource")
|
||||
->where($qb->expr()->eq('group_folder_id', $qb->createNamedParameter($groupfolderId, IQueryBuilder::PARAM_INT)));
|
||||
->where($qb->expr()->eq('organization_folder_id', $qb->createNamedParameter($organizationFolderId, IQueryBuilder::PARAM_INT)));
|
||||
|
||||
if(is_null($parentResourceId)) {
|
||||
$qb->andWhere($qb->expr()->isNull('parent_resource'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue