Index: branches/5.2.x/units/orders/orders_event_handler.php =================================================================== diff -u -N -r14594 -r14618 --- branches/5.2.x/units/orders/orders_event_handler.php (.../orders_event_handler.php) (revision 14594) +++ branches/5.2.x/units/orders/orders_event_handler.php (.../orders_event_handler.php) (revision 14618) @@ -1,6 +1,6 @@ getObject(); if (substr($event->Special, 0, 9) == 'recurring') { @@ -3460,16 +3460,15 @@ ini_set('max_execution_time', '0'); $object =& $event->getObject(); - $file = $object->GetDBField('ShippingTracking').'.pdf'; - $full_path = USPS_LABEL_FOLDER.$file; + $file = $object->GetDBField('ShippingTracking') . '.pdf'; + $full_path = USPS_LABEL_FOLDER . $file; - if (!file_exists($full_path) || !is_file($full_path)) { - return ; + if ( !file_exists($full_path) || !is_file($full_path) ) { + return; } - $mime = function_exists('mime_content_type') ? mime_content_type($full_path) : 'application/download'; - header('Content-type: '.$mime); - header('Content-Disposition: attachment; filename="'.$file.'"'); + header('Content-type: ' . kUtil::mimeContentType($full_path)); + header('Content-Disposition: attachment; filename="' . $file . '"'); readfile($full_path); } } \ No newline at end of file