summaryrefslogtreecommitdiffstats
path: root/system/libraries/Upload.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries/Upload.php')
-rw-r--r--system/libraries/Upload.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 2012fb302..24189f4b4 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -951,7 +951,16 @@ class CI_Upload {
if (count($this->mimes) == 0)
{
- if (@require(APPPATH.'config/mimes'.EXT))
+ if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT))
+ {
+ $_mimes_path = APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT;
+ }
+ else
+ {
+ $_mimes_path = APPPATH.'config/mimes'.EXT;
+ }
+
+ if (@require($_mimes_path))
{
$this->mimes = $mimes;
unset($mimes);