If you edit a download, the file extension is lost when you save the edit. To fix this, look for this around line 549 in downloads.php:
PHP Code:
elseif($_GET['do'] == 'edit')
{
$result = $DB_site->query("UPDATE " . TABLE_PREFIX . "dl_files SET `name`=".$dl->prep($_POST['name']).
add this line before the $result:
PHP Code:
$newfilename = $newfilename.strtolower(substr($file['url'], strrpos($file['url'], '.')+1)); // fix ext dropping problem
The final result should look like:
PHP Code:
elseif($_GET['do'] == 'edit')
{
$newfilename = $newfilename.strtolower(substr($file['url'], strrpos($file['url'], '.')+1)); // fix ext dropping problem
$result = $DB_site->query("UPDATE " . TABLE_PREFIX . "dl_files SET `name`=".$dl->prep($_POST['name']).