From 1bdc9c8903eb2db33fdb8174d61e15100dfbbca8 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 10 Apr 2011 10:39:31 +0200 Subject: update to CI 2.0.2 Signed-off-by: Florian Pritz --- system/helpers/file_helper.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'system/helpers/file_helper.php') diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php index 334eef87c..44344947e 100755 --- a/system/helpers/file_helper.php +++ b/system/helpers/file_helper.php @@ -128,7 +128,7 @@ if ( ! function_exists('delete_files')) return FALSE; } - while(FALSE !== ($filename = @readdir($current_dir))) + while (FALSE !== ($filename = @readdir($current_dir))) { if ($filename != "." and $filename != "..") { @@ -352,7 +352,16 @@ if ( ! function_exists('get_mime_by_extension')) if ( ! is_array($mimes)) { - if ( ! require_once(APPPATH.'config/mimes.php')) + 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); + } + + if ( ! is_array($mimes)) { return FALSE; } -- cgit v1.2.3-24-g4f1b