|
|
|
@ -327,7 +327,7 @@ class DocumentManager |
|
|
|
header('Content-Description: '.$filename); |
|
|
|
header('Content-Description: '.$filename); |
|
|
|
header('Content-Transfer-Encoding: binary'); |
|
|
|
header('Content-Transfer-Encoding: binary'); |
|
|
|
|
|
|
|
|
|
|
|
if (function_exists('ob_end_clean')) { |
|
|
|
if (function_exists('ob_end_clean') && ob_get_length()) { |
|
|
|
// Use ob_end_clean() to avoid weird buffering situations |
|
|
|
// Use ob_end_clean() to avoid weird buffering situations |
|
|
|
// where file is sent broken/incomplete for download |
|
|
|
// where file is sent broken/incomplete for download |
|
|
|
ob_end_clean(); |
|
|
|
ob_end_clean(); |
|
|
|
@ -393,7 +393,7 @@ class DocumentManager |
|
|
|
); |
|
|
|
); |
|
|
|
echo $content; |
|
|
|
echo $content; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (function_exists('ob_end_clean')) { |
|
|
|
if (function_exists('ob_end_clean') && ob_get_length()) { |
|
|
|
// Use ob_end_clean() to avoid weird buffering situations |
|
|
|
// Use ob_end_clean() to avoid weird buffering situations |
|
|
|
// where file is sent broken/incomplete for download |
|
|
|
// where file is sent broken/incomplete for download |
|
|
|
ob_end_clean(); |
|
|
|
ob_end_clean(); |
|
|
|
|