Skip to content

Commit

Permalink
Add some TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-anne committed Apr 18, 2024
1 parent 22012ab commit 0f05b7c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/CommonItilObject_Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ public static function dropdownMyDevices($userID = 0, $entity_restrict = -1, $it
$criteria = [
'FROM' => $itemtable,
'WHERE' => [
'groups_id' => $groups
'groups_id' => $groups // TODO: relation has been moved in glpi_groups_assets
] + getEntitiesRestrictCriteria($itemtable, '', $entity_restrict, $item->maybeRecursive())
+ $itemtype::getSystemSQLCriteria(),
'ORDER' => $item->getNameField()
Expand Down
2 changes: 1 addition & 1 deletion src/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ public function getDataItems(array $types, $field, $tree, $user, $start, array &
$groups_ids = [$this->getID()];
}
// include items of members
$groups_criteria = [];
$groups_criteria = []; // TODO: This will not work anymore for types that can be assigned to multiple groups
if ($user) {
$ufield = str_replace('groups', 'users', $field);
$groups_criteria['OR'] = [
Expand Down
3 changes: 1 addition & 2 deletions src/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -5144,7 +5144,6 @@ public function showItems($tech)
}
$itemtypes = array_unique($itemtypes);

$group_where = "";
$groups = [];

$iterator = $DB->request([
Expand All @@ -5165,7 +5164,7 @@ public function showItems($tech)
]);
$number = 0;

$group_where = [];
$group_where = []; // TODO: This will not work anymore for types that can be assigned to multiple groups
foreach ($iterator as $data) {
$group_where[$field_group][] = $data['id'];
$groups[$data["id"]] = $data["name"];
Expand Down

0 comments on commit 0f05b7c

Please sign in to comment.