Skip to content

Conversation

@Aeto-J
Copy link
Contributor

@Aeto-J Aeto-J commented Aug 18, 2022

Adding posibility to create a dropdown on self block

block_computermodels

Block_computermodels_dropdownself

Adding possibility to make a filter on different object ( ex: on computer can filter computermodels) and dropdown with computermodels data
Adding possibility to add a column on different object ( ex: make a column on computer asset, search on computermodels)

Search_computermodel_customfield_assetComputer

note: this change work on other asset or other data not only on computer and computermodels

@tomolimo tomolimo changed the title Add some changes Add the possibility to have field itemtype onto same itemtype (recursion on itself) Sep 13, 2022
Comment on lines -1590 to -1596
$search_string = json_encode($itemtype);
// Backslashes must be doubled in LIKE clause, according to MySQL documentation:
// > To search for \, specify it as \\\\; this is because the backslashes are stripped
// > once by the parser and again when the pattern match is made,
// > leaving a single backslash to be matched against.
$search_string = str_replace('\\', '\\\\', $search_string);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be reverted. It is mandatory to correctly handle itemtype using namespaces (i.e. Glpi\Socket).

ON containers.id = fields.plugin_fields_containers_id
AND containers.is_active = 1
WHERE containers.itemtypes LIKE '%" . $DB->escape($search_string) . "%'
WHERE containers.itemtypes LIKE '%" . $itemtype . "%'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same remark.

@cedric-anne
Copy link
Contributor

Fixed by #577

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants