diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-05-02 12:27:30 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-05-02 12:27:30 +0200 |
commit | 14aa3178e12f285bed006511902e50aaae69bada (patch) | |
tree | a33410e21a5de095070fc5cc6d14b2649954e0a7 /system/helpers/download_helper.php | |
parent | 3ea6b1fd8fb0492d84c4879e039d11713c9f39a5 (diff) | |
parent | 963c96c5507ceb8b5c3de50d0ab959d21dcc8cd1 (diff) |
Merge upstream branch
Diffstat (limited to 'system/helpers/download_helper.php')
-rw-r--r-- | system/helpers/download_helper.php | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 19192a147..97e6986b0 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -37,18 +37,18 @@ // ------------------------------------------------------------------------ -/** - * Force Download - * - * Generates headers that force a download to happen - * - * @param string filename - * @param mixed the data to be downloaded - * @param bool wether to try and send the actual file MIME type - * @return void - */ if ( ! function_exists('force_download')) { + /** + * Force Download + * + * Generates headers that force a download to happen + * + * @param string filename + * @param mixed the data to be downloaded + * @param bool wether to try and send the actual file MIME type + * @return void + */ function force_download($filename = '', $data = '', $set_mime = FALSE) { if ($filename == '' OR $data == '') @@ -100,6 +100,9 @@ if ( ! function_exists('force_download')) $x[count($x) - 1] = strtoupper($extension); $filename = implode('.', $x); } + + // Clean output buffer + ob_clean(); // Generate the server headers header('Content-Type: '.$mime); |