Skip to content

Commit

Permalink
Fix errors see #362
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmr committed Aug 1, 2023
1 parent 6011e75 commit 8433a48
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -810,8 +810,8 @@ function plugin_ocsinventoryng_getDatabaseRelations()
"glpi_plugin_ocsinventoryng_registrykeys" => "computers_id",
"glpi_plugin_ocsinventoryng_details" => "computers_id"],

"glpi_networkports"
=> ["glpi_plugin_ocsinventoryng_networkports" => "networkports_id"],
//"glpi_networkports"
//=> ["glpi_plugin_ocsinventoryng_networkports" => "networkports_id"],

"glpi_profiles"
=> ["glpi_plugin_ocsinventoryng_ocsservers_profiles" => "profiles_id"]];
Expand Down Expand Up @@ -1374,9 +1374,13 @@ function plugin_ocsinventoryng_ruleCollectionPrepareInputDataForProcess($params)
case 'RuleImportAsset':
$ocsservers_id = 0;
if ($params['rule_itemtype'] == 'RuleImportEntity') {
$ocsservers_id = $params['values']['input']['ocsservers_id'];
if (isset($params['values']['input']['ocsservers_id'])) {
$ocsservers_id = $params['values']['input']['ocsservers_id'];
}
} else {
$ocsservers_id = $params['values']['params']['plugin_ocsinventoryng_ocsservers_id'];
if (isset($params['values']['params']['plugin_ocsinventoryng_ocsservers_id'])) {
$ocsservers_id = $params['values']['params']['plugin_ocsinventoryng_ocsservers_id'];
}
}

$rule_parameters = [
Expand Down

0 comments on commit 8433a48

Please sign in to comment.