summaryrefslogtreecommitdiffstats
path: root/system/helpers/download_helper.php
diff options
context:
space:
mode:
authorBarry Mieny <barry@mieny.com>2010-10-04 16:33:58 +0200
committerBarry Mieny <barry@mieny.com>2010-10-04 16:33:58 +0200
commitdd6719738936be31cdaa1758ca86d5eb14dcab3d (patch)
treeb5ef66e31b2d0f4f2c1cbccc367bde92c156e1f9 /system/helpers/download_helper.php
parent3351fbc56cea19ec3dd603836beb0a420b1ded65 (diff)
Cleanup of stray spaces and tabs
Diffstat (limited to 'system/helpers/download_helper.php')
-rw-r--r--system/helpers/download_helper.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php
index eac024fcb..4a17e519e 100644
--- a/system/helpers/download_helper.php
+++ b/system/helpers/download_helper.php
@@ -36,7 +36,7 @@
* @param string filename
* @param mixed the data to be downloaded
* @return void
- */
+ */
if ( ! function_exists('force_download'))
{
function force_download($filename = '', $data = '')
@@ -52,14 +52,14 @@ if ( ! function_exists('force_download'))
{
return FALSE;
}
-
+
// Grab the file extension
$x = explode('.', $filename);
$extension = end($x);
// Load the mime types
@include(APPPATH.'config/mimes'.EXT);
-
+
// Set a default mime if we can't find it
if ( ! isset($mimes[$extension]))
{
@@ -69,7 +69,7 @@ if ( ! function_exists('force_download'))
{
$mime = (is_array($mimes[$extension])) ? $mimes[$extension][0] : $mimes[$extension];
}
-
+
// Generate the server headers
if (strpos($_SERVER['HTTP_USER_AGENT'], "MSIE") !== FALSE)
{
@@ -90,7 +90,7 @@ if ( ! function_exists('force_download'))
header('Pragma: no-cache');
header("Content-Length: ".strlen($data));
}
-
+
exit($data);
}
}