Skip to content

Commit

Permalink
Merge pull request #1524 from OCSInventory-NG/fix_admininfo_spaces
Browse files Browse the repository at this point in the history
fix(admininfo): fix checkbox with spaces
  • Loading branch information
charleneauger committed Jun 9, 2023
2 parents dab39ce + bd1b4d7 commit 403b3c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/computer_detail/cd_admininfo/cd_admininfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@
if ((isset($temp_field[1]) && (array_key_exists($temp_field[0] . '_' . $temp_field[1], $info_account_id))) || $temp_field[0] == 'TAG') {
//cas of checkbox
if (isset($temp_field[2])) {
$data_fields_account[$temp_field[0] . "_" . $temp_field[1]] .= $temp_field[2] . "&&&";
$temp_field2 = $temp_field;
unset($temp_field2[0]);
unset($temp_field2[1]);
$new_value = implode(' ', $temp_field2);
$data_fields_account[$temp_field[0] . "_" . $temp_field[1]] .= $new_value . "&&&";
} else {
$data_fields_account[$field] = $value;
}
Expand Down

0 comments on commit 403b3c3

Please sign in to comment.