If the user already appended the file extension, don't add it again
This commit is contained in:
@@ -281,7 +281,13 @@ if ($asfile) {
|
||||
}
|
||||
|
||||
// Grab basic dump extension and mime type
|
||||
$filename .= '.' . $export_list[$type]['extension'];
|
||||
// Check if the user already added extension; get the substring where the extension would be if it was included
|
||||
$extension_start_pos = strlen($filename) - strlen($export_list[$type]['extension']) - 1;
|
||||
$user_extension = substr($filename, $extension_start_pos, strlen($filename));
|
||||
$required_extension = "." . $export_list[$type]['extension'];
|
||||
if(strtolower($user_extension) != $required_extension) {
|
||||
$filename .= $required_extension;
|
||||
}
|
||||
$mime_type = $export_list[$type]['mime_type'];
|
||||
|
||||
// If dump is going to be compressed, set correct mime_type and add
|
||||
|
Reference in New Issue
Block a user