Skip to content

Commit

Permalink
refactor(formanswer): set entity with shorter expression
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed May 17, 2023
1 parent 030f93e commit d0db95c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions inc/formanswer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -847,9 +847,7 @@ public function prepareInputForAdd($input) {

$input = $this->setValidator($input, $form);

$input['entities_id'] = isset($_SESSION['glpiactive_entity'])
? $_SESSION['glpiactive_entity']
: $form->fields['entities_id'];
$input['entities_id'] = $_SESSION['glpiactive_entity'] ?? $form->fields['entities_id'];

$input['is_recursive'] = $form->fields['is_recursive'];
$input['plugin_formcreator_forms_id'] = $form->getID();
Expand Down

0 comments on commit d0db95c

Please sign in to comment.