Index: branches/5.2.x/core/units/helpers/file_helper.php =================================================================== diff -u -N -r14585 -r14619 --- branches/5.2.x/core/units/helpers/file_helper.php (.../file_helper.php) (revision 14585) +++ branches/5.2.x/core/units/helpers/file_helper.php (.../file_helper.php) (revision 14619) @@ -1,6 +1,6 @@ 'int', 'default' => 0); - if ($is_image) { + if ( $is_image ) { $virtual_fields[$field_name . 'Alt'] = Array ('type' => 'string', 'default' => ''); } } @@ -238,11 +241,9 @@ */ function DownloadFile($filename) { - $content_type = function_exists('mime_content_type') ? mime_content_type($filename) : 'application/octet-stream'; - - header('Content-type: '.$content_type); - header('Content-Disposition: attachment; filename="'.basename($filename).'"'); - header('Content-Length: '.filesize($filename)); + header('Content-type: ' . kUtil::mimeContentType($filename)); + header('Content-Disposition: attachment; filename="' . basename($filename) . '"'); + header('Content-Length: ' . filesize($filename)); readfile($filename); flush(); }