summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortianhe1986 <w1s2j3229@163.com>2017-02-04 09:54:19 +0100
committertianhe1986 <w1s2j3229@163.com>2017-02-04 09:54:19 +0100
commit9b3cef3a108055b67a9c34c6b07cd0aea3030eff (patch)
tree696fc9725260bc03c76b24a8442e263bafbb1299
parent77db815a619864f8d2c59a4b02bac2f6fd6b3d69 (diff)
Loading global mimes config file first, and then environment file.
Signed-off-by: tianhe1986 <w1s2j3229@163.com>
-rw-r--r--system/core/Common.php15
1 files changed, 7 insertions, 8 deletions
diff --git a/system/core/Common.php b/system/core/Common.php
index 5c6f88ef9..2db94c165 100644
--- a/system/core/Common.php
+++ b/system/core/Common.php
@@ -318,17 +318,16 @@ if ( ! function_exists('get_mimes'))
if (empty($_mimes))
{
- if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'))
- {
- $_mimes = include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php');
- }
- elseif (file_exists(APPPATH.'config/mimes.php'))
+ $_mimes = array();
+
+ if (file_exists(APPPATH.'config/mimes.php'))
{
- $_mimes = include(APPPATH.'config/mimes.php');
+ $_mimes = array_merge($_mimes, include(APPPATH.'config/mimes.php'));
}
- else
+
+ if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'))
{
- $_mimes = array();
+ $_mimes = array_merge($_mimes, include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'));
}
}