Skip to content

Commit

Permalink
[Ticket] fix: remove linked files action
Browse files Browse the repository at this point in the history
  • Loading branch information
Théo David committed Sep 16, 2021
1 parent f8d8583 commit c9b111f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions public/ticket/create_ticket.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,10 @@
$thumbsList = dol_dir_list($ticket_upload_dir . 'thumbs/');
if (!empty($thumbsList)) {
foreach ($thumbsList as $thumb) {
dol_delete_file($ticket_upload_dir . 'thumbs/' . $thumb['name'] );
if (preg_match('/'. preg_split('/\./', $filetodelete)[0] . '/', $thumb['name'])) {
dol_delete_file($ticket_upload_dir . 'thumbs/' . $thumb['name'] );
}
}
dol_delete_dir($ticket_upload_dir . 'thumbs/');
}
}
$action = '';
Expand Down

0 comments on commit c9b111f

Please sign in to comment.