File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 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) {
304304 // Set specific root if defined (CommonTreeDropdown)
305305 $ baseLevel = 0 ;
306306 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 )
308309 ) {
309310 $ sons = (new DBUtils )->getSonsOf (
310311 $ itemtype ::getTable (),
311312 $ decodedValues ['show_tree_root ' ]
312313 );
313314 $ 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 ' ) {
315316 unset($ sons [$ decodedValues ['show_tree_root ' ]]);
316317 }
317318
You can’t perform that action at this time.
0 commit comments