Skip to content

Commit

Permalink
fix(dropdownfield): compatibility with Document itemtype
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <[email protected]>
  • Loading branch information
btry committed Oct 26, 2020
1 parent b8d6466 commit bdd533a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inc/fields/dropdownfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,14 @@ public function displayField($canEdit = true) {
$dparams = ['name' => $fieldName,
'value' => $this->value,
'comments' => false,
'entity' => $_SESSION['glpiactive_entity'], // TODO: replace by Session::getActiveEntity when dropping GLPI 9.4
'entity' => $_SESSION['glpiactiveentities'],
'displaywith' => ['id'],
'rand' => $rand];

$dparams_cond_crit = [];
switch ($itemtype) {
case Entity::class:
case Document::class:
unset($dparams['entity']);

case User::class:
Expand Down

0 comments on commit bdd533a

Please sign in to comment.