tinyfilemanager
tinyfilemanager copied to clipboard
Added 'Overwrite Files' Checkbox to Give Users the Option of Overwriting Existing Files During Upload
This would be an optional checkbox users could choose to use in the case they want to overwrite uploaded files if there is already one that matches the same filename.
Haven't tested this, but in theory it's a worthwhile addition.
Just a nitpick: keep the code formatting in line with the current style, for example:
if ($overwrite_files == 'Y') {
$fullPathTarget = $path . '/' . basename($fullPathInput, $ext_1) . $ext_1;
} else {
$fullPathTarget = $path . '/' . basename($fullPathInput, $ext_1) .'_'. date('ymdHis'). $ext_1;
}
Tested and works like a charm with version 2.5.3! Easy to implement. Thank you!
Suggestion, to be able to translate:
Replace
Overwrite existing files?by <?php echo lng('Overwrite existing files?') ?>
Add around line 4310
$tr['en']['Overwrite existing files?'] = 'Overwrite existing files?';