File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -5594,13 +5594,8 @@ public function addFiles(array $input, $options = [])
55945594 $ doc ->update ($ input2 );
55955595 }
55965596 } else {
5597- if ($ this ->getType () == 'Ticket ' || (isset ($ input ['_job ' ]) && $ input ['_job ' ] instanceof Ticket)) {
5598- //TRANS: Default document to files attached to tickets : %d is the ticket id
5599- if (isset ($ input ['_job ' ]) && $ input ['_job ' ] instanceof Ticket) {
5600- $ ticket_id = $ input ['_job ' ]->getID ();
5601- } else {
5602- $ ticket_id = $ this ->getID ();
5603- }
5597+ if (($ input ['_job ' ] ?? $ this ) instanceof Ticket) {
5598+ $ ticket_id = $ input ['_job ' ]->getID () ?? $ this ->getID ();
56045599 $ input2 ["name " ] = addslashes (sprintf (__ ('Document Ticket %d ' ), $ ticket_id ));
56055600 $ input2 ["tickets_id " ] = $ ticket_id ;
56065601 $ input2 ['itemtype ' ] = Ticket::class;
You can’t perform that action at this time.
0 commit comments