File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 4545 exit ;
4646}
4747
48+ $ _SESSION ['kb_cat_id ' ] = $ _REQUEST ['cat_id ' ] ?? 0 ;
49+
4850switch ($ _REQUEST ['action ' ]) {
4951 case "getItemslist " :
5052 header ("Content-Type: application/json; charset=UTF-8 " );
Original file line number Diff line number Diff line change @@ -152,6 +152,7 @@ public static function showBrowseView()
152152 $ ajax_url = $ CFG_GLPI ["root_doc " ] . "/ajax/knowbase.php " ;
153153 $ loading_txt = __s ('Loading... ' );
154154 $ start = (int )($ _REQUEST ['start ' ] ?? 0 );
155+ $ cat_id = (int )($ _SESSION ['kb_cat_id ' ] ?? 0 );
155156
156157 $ category_list = json_encode (self ::getTreeCategoryList ());
157158 $ no_cat_found = __s ("No category found " );
@@ -201,7 +202,8 @@ public static function showBrowseView()
201202 'start': $ start
202203 });
203204 };
204- loadNode(0);
205+ loadNode( $ cat_id);
206+ $.ui.fancytree.getTree("#tree_category $ rand").activateKey( $ cat_id);
205207
206208 $(document).on('keyup', '#browser_tree_search $ rand', function() {
207209 var search_text = $(this).val();
You can’t perform that action at this time.
0 commit comments