Skip to content

Commit

Permalink
use manageParam instaed of backup / restore session
Browse files Browse the repository at this point in the history
  • Loading branch information
stonebuzz committed Nov 10, 2023
1 parent aedd6bd commit a3b0503
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion inc/deploygroup.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ public static function getSearchParamsAsAnArray(PluginGlpiinventoryDeployGroup $
}

$computers_params["reset"] = true;
return Search::manageParams('Computer', $computers_params, true, false);
return Search::manageParams('Computer', $computers_params, false, false);
}


Expand Down
4 changes: 2 additions & 2 deletions inc/deploygroup_staticdata.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public static function showCriteriaAndSearch(PluginGlpiinventoryDeployGroup $ite
$search_params['massiveactionparams']['extraparams']['specific_actions']['PluginGlpiinventoryComputer' . MassiveAction::CLASS_ACTION_SEPARATOR . 'add'] = __('Add to static group', 'glpiinventory');
$search_params['massiveactionparams']['extraparams']['massive_action_fields'] = ['action', 'id'];

$backup_computer_search = $_SESSION['glpisearch']['Computer'];
//$backup_computer_search = $_SESSION['glpisearch']['Computer'];
$data = Search::prepareDatasForSearch('Computer', $search_params);
$data['itemtype'] = 'Computer';
Search::constructSQL($data);
Expand All @@ -181,7 +181,7 @@ public static function showCriteriaAndSearch(PluginGlpiinventoryDeployGroup $ite
$_SESSION['glpilist_limit'] = 200;
Search::displayData($data);
$_SESSION['glpilist_limit'] = $limit_backup;
$_SESSION['glpisearch']['Computer'] = $backup_computer_search;
//$_SESSION['glpisearch']['Computer'] = $backup_computer_search;

//remove trashbin switch
echo Html::scriptBlock("
Expand Down

0 comments on commit a3b0503

Please sign in to comment.