[TASK] Improve filename in *.t3d export
authorMario Rimann <typo3-coding@rimann.org>
Tue, 16 Aug 2011 20:34:47 +0000 (22:34 +0200)
committerSteffen Gebert <steffen.gebert@typo3.org>
Mon, 29 Aug 2011 21:08:40 +0000 (23:08 +0200)
Change the default date format in the filename when exporting
a T3D file to be YYYY-MM-DD_HH-MM in order to make the
exported files sortable.

Change-Id: Idc463cbf0e33757152dc7f906a49068d6827f097
Resolves: #28777
Releases: 4.6
Reviewed-on: http://review.typo3.org/4383
Reviewed-by: Steffen Gebert
Tested-by: Steffen Gebert
typo3/sysext/impexp/app/index.php

index 62866ff..fad2cdd 100755 (executable)
@@ -552,7 +552,11 @@ class SC_mod_tools_log_index extends t3lib_SCbase {
                        }
 
                                // Filename:
-                       $dlFile = $inData['filename'] ? $inData['filename'] : 'T3D_'.substr(preg_replace('/[^[:alnum:]_]/','-',$inData['download_export_name']),0,20).'_'.date('d-m-H-i-s').$fExt;
+                       $dlFile = $inData['filename']
+                                       ? $inData['filename']
+                                       : 'T3D_' .
+                                               substr(preg_replace('/[^[:alnum:]_]/', '-', $inData['download_export_name']), 0, 20) .
+                                               '_' . date('Y-m-d_H-i') . $fExt;
 
                                // Export for download:
                        if ($inData['download_export']) {