Fix export fatture csv

This commit is contained in:
Luca 2020-12-02 11:47:02 +01:00
parent 3ee8786159
commit 62bded2805
2 changed files with 6 additions and 3 deletions

View File

@ -544,10 +544,12 @@ if (!function_exists('temp_file')) {
$name = secure_random_string();
}
$file = DIRECTORY_SEPARATOR.
/*$file = DIRECTORY_SEPARATOR.
trim(sys_get_temp_dir(), DIRECTORY_SEPARATOR).
DIRECTORY_SEPARATOR.
ltrim($name, DIRECTORY_SEPARATOR);
ltrim($name, DIRECTORY_SEPARATOR);*/
$file = implode(DIRECTORY_SEPARATOR, [base_dir(), 'files', 'temp', ltrim($name, DIRECTORY_SEPARATOR)]);
file_put_contents($file, $content);

View File

@ -431,7 +431,8 @@ switch (post('op')) {
break;
case 'export-csv':
$file = temp_file();
$file = temp_file().'.csv';
$exporter = new CSV($file);
// Esportazione dei record selezionati