| @@ 3971-3994 (lines=24) @@ | ||
| 3968 | * @param string $perms_clause select clause |
|
| 3969 | * @return int[] |
|
| 3970 | */ |
|
| 3971 | protected function getSearchableWebmounts($id, $depth, $perms_clause) |
|
| 3972 | { |
|
| 3973 | $backendUser = $this->getBackendUserAuthentication(); |
|
| 3974 | /** @var PageTreeView $tree */ |
|
| 3975 | $tree = GeneralUtility::makeInstance(PageTreeView::class); |
|
| 3976 | $tree->init('AND ' . $perms_clause); |
|
| 3977 | $tree->makeHTML = 0; |
|
| 3978 | $tree->fieldArray = ['uid', 'php_tree_stop']; |
|
| 3979 | $idList = []; |
|
| 3980 | ||
| 3981 | $allowedMounts = !$backendUser->isAdmin() && $id === 0 |
|
| 3982 | ? $backendUser->returnWebmounts() |
|
| 3983 | : [$id]; |
|
| 3984 | ||
| 3985 | foreach ($allowedMounts as $allowedMount) { |
|
| 3986 | $idList[] = $allowedMount; |
|
| 3987 | if ($depth) { |
|
| 3988 | $tree->getTree($allowedMount, $depth, ''); |
|
| 3989 | } |
|
| 3990 | $idList = array_merge($idList, $tree->ids); |
|
| 3991 | } |
|
| 3992 | ||
| 3993 | return $idList; |
|
| 3994 | } |
|
| 3995 | ||
| 3996 | /** |
|
| 3997 | * Add conditions to the QueryBuilder object ($queryBuilder) to limit a |
|
| @@ 3846-3869 (lines=24) @@ | ||
| 3843 | * @param string $perms_clause select clause |
|
| 3844 | * @return int[] |
|
| 3845 | */ |
|
| 3846 | protected function getSearchableWebmounts($id, $depth, $perms_clause) |
|
| 3847 | { |
|
| 3848 | $backendUser = $this->getBackendUserAuthentication(); |
|
| 3849 | /** @var PageTreeView $tree */ |
|
| 3850 | $tree = GeneralUtility::makeInstance(PageTreeView::class); |
|
| 3851 | $tree->init('AND ' . $perms_clause); |
|
| 3852 | $tree->makeHTML = 0; |
|
| 3853 | $tree->fieldArray = ['uid', 'php_tree_stop']; |
|
| 3854 | $idList = []; |
|
| 3855 | ||
| 3856 | $allowedMounts = !$backendUser->isAdmin() && $id === 0 |
|
| 3857 | ? $backendUser->returnWebmounts() |
|
| 3858 | : [$id]; |
|
| 3859 | ||
| 3860 | foreach ($allowedMounts as $allowedMount) { |
|
| 3861 | $idList[] = $allowedMount; |
|
| 3862 | if ($depth) { |
|
| 3863 | $tree->getTree($allowedMount, $depth, ''); |
|
| 3864 | } |
|
| 3865 | $idList = array_merge($idList, $tree->ids); |
|
| 3866 | } |
|
| 3867 | ||
| 3868 | return $idList; |
|
| 3869 | } |
|
| 3870 | ||
| 3871 | /** |
|
| 3872 | * Add conditions to the QueryBuilder object ($queryBuilder) to limit a |
|