File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -304,14 +304,15 @@ public function buildParams($rand = null) {
304
304
// Set specific root if defined (CommonTreeDropdown)
305
305
$ baseLevel = 0 ;
306
306
if (isset ($ decodedValues ['show_tree_root ' ])
307
- && (int ) $ decodedValues ['show_tree_root ' ] > 0
307
+ && ((int ) $ decodedValues ['show_tree_root ' ] > 0
308
+ || $ itemtype == Entity::class && (int ) $ decodedValues ['show_tree_root ' ] > -1 )
308
309
) {
309
310
$ sons = (new DBUtils )->getSonsOf (
310
311
$ itemtype ::getTable (),
311
312
$ decodedValues ['show_tree_root ' ]
312
313
);
313
314
$ decodedValues ['selectable_tree_root ' ] = $ decodedValues ['selectable_tree_root ' ] ?? '1 ' ;
314
- if (! isset ( $ decodedValues [ ' selectable_tree_root ' ]) || $ decodedValues ['selectable_tree_root ' ] == '0 ' ) {
315
+ if ($ decodedValues ['selectable_tree_root ' ] == '0 ' ) {
315
316
unset($ sons [$ decodedValues ['show_tree_root ' ]]);
316
317
}
317
318
You can’t perform that action at this time.
0 commit comments