summaryrefslogtreecommitdiffstats
path: root/system/helpers/download_helper.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@server-speed.net>2011-04-10 10:39:31 +0200
committerFlorian Pritz <bluewind@server-speed.net>2011-04-10 10:39:31 +0200
commit1bdc9c8903eb2db33fdb8174d61e15100dfbbca8 (patch)
treeb0c645ad99e04f34817fc4e6385792111db42274 /system/helpers/download_helper.php
parent413d0cdac49257089a0790f6ac92973a36a6b69f (diff)
update to CI 2.0.2
Signed-off-by: Florian Pritz <bluewind@server-speed.net>
Diffstat (limited to 'system/helpers/download_helper.php')
-rwxr-xr-xsystem/helpers/download_helper.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php
index 6cecd0d11..f8073d238 100755
--- a/system/helpers/download_helper.php
+++ b/system/helpers/download_helper.php
@@ -58,7 +58,14 @@ if ( ! function_exists('force_download'))
$extension = end($x);
// Load the mime types
- @include(APPPATH.'config/mimes'.EXT);
+ if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT))
+ {
+ include(APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT);
+ }
+ elseif (is_file(APPPATH.'config/mimes'.EXT))
+ {
+ include(APPPATH.'config/mimes'.EXT);
+ }
// Set a default mime if we can't find it
if ( ! isset($mimes[$extension]))