Skip to content

Commit

Permalink
style(formanswer): simplify code
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Nov 30, 2021
1 parent c4473de commit dc71c02
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions inc/formanswer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -719,10 +719,8 @@ public function prepareInputForAdd($input) {
$input['plugin_formcreator_forms_id'] = $form->getID();
// requester_id is actually the author
// TODO : rename this column
$input['requester_id'] = isset($_SESSION['glpiID'])
? $_SESSION['glpiID']
: 0;
$input['request_date'] = date('Y-m-d H:i:s');
$input['requester_id'] = $_SESSION['glpiID'] ?? 0;
$input['request_date'] = $_SESSION['glpi_currenttime'];
$input['comment'] = '';

return $input;
Expand Down

0 comments on commit dc71c02

Please sign in to comment.