Skip to content

Commit

Permalink
Evarisk#1918 [Sheet] fix: export name failure on server
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-eoxia committed Nov 15, 2024
1 parent feaa154 commit 00a6a73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions view/sheet/sheet_export.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@
}

$fileDir = $upload_dir . '/temp/';
$exportName = (!empty($object->label) ? dol_string_nospecial($object->label, '_', '', ['-']) : $object->ref);
$fileName = dol_print_date(dol_now(), 'dayhourlog', 'tzuser') . '_dolibarr_' . $exportName . '_export';
$exportName = str_replace(' ', '_', (!empty($object->label) ? $object->label : $object->ref));
$fileName = dol_sanitizeFileName(dol_print_date(dol_now(), 'dayhourlog', 'tzuser') . '_' . dol_strtolower($exportName) . '_export');
$fullName = $fileDir . $fileName . '.json';

if (!is_dir($fileDir)) {
Expand Down

0 comments on commit 00a6a73

Please sign in to comment.