⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

- Fix model subform not displayed after page reload
- Rename visibility field label to "Is Private"
- Restored group selection in mappings
- Fix special caracters malformed in translations

## [2.15.3] - 2025-12-22
Expand Down
5 changes: 4 additions & 1 deletion inc/applianceinjection.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,17 @@ public function getOptions($primary_type = '')

$tab = Search::getOptions(get_parent_class($this));

//Specific to groups (simple group, not technical)
$tab[71]['linkfield'] = 'groups_id_normal';

//Remove some options because some fields cannot be imported
$blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this));
$notimportable = [5, 9, 31];

$options['ignore_fields'] = array_merge($blacklist, $notimportable);
$options['displaytype'] = [
"multiline_text" => [4],
"dropdown" => [8, 10, 11, 32, 49],
"dropdown" => [8, 10, 11, 32, 49, 71],
"user" => [6, 24],
"bool" => [7, 61],
];
Expand Down
3 changes: 3 additions & 0 deletions inc/certificateinjection.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ public function getOptions($primary_type = '')

$tab = Search::getOptions(get_parent_class($this));

//Specific to groups (simple group, not technical)
$tab[71]['linkfield'] = 'groups_id_normal';

//Remove some options because some fields cannot be imported
$blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this));
$notimportable = [2, 14, 19, 61, 72, 121];
Expand Down
10 changes: 5 additions & 5 deletions inc/commoninjectionlib.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1673,14 +1673,14 @@ private function effectiveAddOrUpdate($injectionClass, $item, $values, $add = tr

// handle new format for group type specification
// restricting to group_item relations only
if (($key === "groups_id_tech" || $key === "groups_id") && $option['table'] == getTableForItemType(Group::class) && !empty($option) && isset($option['joinparams']['beforejoin']['table']) && $option['joinparams']['beforejoin']['table'] === getTableForItemType(Group_Item::class) && isset($option['joinparams']['beforejoin']['joinparams']['condition']['NEWTABLE.type'])) {
$value = $option['joinparams']['beforejoin']['joinparams']['condition']['NEWTABLE.type'];
if (($key === "groups_id_tech" || $key === "groups_id" || $key === "groups_id_normal") && $option['table'] == getTableForItemType(Group::class) && !empty($option) && isset($option['joinparams']['beforejoin']['table']) && $option['joinparams']['beforejoin']['table'] === getTableForItemType(Group_Item::class) && isset($option['joinparams']['beforejoin']['joinparams']['condition']['NEWTABLE.type'])) {
$group_type = $option['joinparams']['beforejoin']['joinparams']['condition']['NEWTABLE.type'];
// depending on the type, set the correct field (_groups_id_tech => array or _groups_id => array)
// and unset the old one (groups_id_tech => int or groups_id => int)
if ($value == Group_Item::GROUP_TYPE_TECH) {
// and unset the old one (groups_id_tech => int or groups_id => int or groups_id_normal => int)
if ($group_type == Group_Item::GROUP_TYPE_TECH) {
$toinject["_groups_id_tech"] = [$value];
} else {
$toinject["_groups"] = [$value];
$toinject["_groups_id"] = [$value];
}
unset($toinject[$key]);
}
Expand Down
3 changes: 3 additions & 0 deletions inc/computerinjection.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ public function getOptions($primary_type = '')
//Specific to location
$tab[3]['linkfield'] = 'locations_id';

//Specific to groups (simple group, not technical)
$tab[71]['linkfield'] = 'groups_id_normal';

//specific for antiviruses
$tab[167]['name'] = __('Antivirus name', 'datainjection');

Expand Down
3 changes: 3 additions & 0 deletions inc/monitorinjection.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ public function getOptions($primary_type = '')
//Specific to location
$tab[3]['linkfield'] = 'locations_id';

//Specific to groups (simple group, not technical)
$tab[71]['linkfield'] = 'groups_id_normal';

//Remove some options because some fields cannot be imported
$blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this));
$notimportable = [91, 92, 93];
Expand Down
3 changes: 3 additions & 0 deletions inc/peripheralinjection.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ public function getOptions($primary_type = '')
//Specific to location
$tab[3]['linkfield'] = 'locations_id';

//Specific to groups (simple group, not technical)
$tab[71]['linkfield'] = 'groups_id_normal';

//Remove some options because some fields cannot be imported
$blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this));
$notimportable = [91, 92, 93];
Expand Down
3 changes: 3 additions & 0 deletions inc/phoneinjection.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ public function getOptions($primary_type = '')

$tab = Search::getOptions(get_parent_class($this));

//Specific to groups (simple group, not technical)
$tab[71]['linkfield'] = 'groups_id_normal';

//specific for domain
$tab[205]['name'] = __('Domain name', 'datainjection');

Expand Down
3 changes: 3 additions & 0 deletions inc/printerinjection.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ public function getOptions($primary_type = '')
//Specific to location
$tab[3]['linkfield'] = 'locations_id';

//Specific to groups (simple group, not technical)
$tab[71]['linkfield'] = 'groups_id_normal';

//Remove some options because some fields cannot be imported
$blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this));
$notimportable = [91, 92, 93];
Expand Down