From e5590520db9e54413b849bfcc5853725daf14ba0 Mon Sep 17 00:00:00 2001 From: David Durieux Date: Mon, 17 Oct 2022 22:43:03 +0200 Subject: [PATCH] Remove code to add possibility to add computers direcctly from static group. --- inc/deploygroup_staticdata.class.php | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/inc/deploygroup_staticdata.class.php b/inc/deploygroup_staticdata.class.php index 213f4e124e..954d1802f8 100644 --- a/inc/deploygroup_staticdata.class.php +++ b/inc/deploygroup_staticdata.class.php @@ -156,29 +156,12 @@ static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtem * @param object $item PluginFusioninventoryDeployGroup instance */ static function showCriteriaAndSearch(PluginFusioninventoryDeployGroup $item) { - // WITH checking post values - $search_params = PluginFusioninventoryDeployGroup::getSearchParamsAsAnArray($item, true); - //If metacriteria array is empty, remove it as it displays the metacriteria form, - //and it's is not we want ! - if (isset($search_params['metacriteria']) && empty($search_params['metacriteria'])) { - unset($search_params['metacriteria']); - } - PluginFusioninventoryDeployGroup::showCriteria($item, $search_params); - - //Add extra parameters for massive action display : only the Add action should be displayed - $search_params['massiveactionparams']['extraparams']['id'] = $item->getID(); - $search_params['massiveactionparams']['extraparams']['custom_action'] = 'add_to_group'; - $search_params['massiveactionparams']['extraparams']['massive_action_fields'] = ['action', 'id']; - $data = Search::prepareDatasForSearch('PluginFusioninventoryComputer', $search_params); - $data['itemtype'] = 'Computer'; - Search::constructSQL($data); - - // Use our specific constructDatas function rather than Glpi function - PluginFusioninventorySearch::constructDatas($data); - $data['search']['target'] = PluginFusioninventoryDeployGroup::getSearchEngineTargetURL($item->getID(), false); - $data['itemtype'] = 'PluginFusioninventoryComputer'; - Search::displayData($data); + echo '

'; + echo "With the difficulties to use the search engine in GLPI 10.0.x, we can't continue to propose add computers from this tab.

"; + echo "We invite you to go in computer list, search, then check computers you want to add to this group.

"; + echo "To finish, click on actions button and use Add to static group"; + echo '

'; }