summaryrefslogtreecommitdiffstats
path: root/system/libraries/Upload.php
diff options
context:
space:
mode:
authorCory <ckdarby@gmail.com>2012-06-06 18:46:40 +0200
committerCory <ckdarby@gmail.com>2012-06-06 18:46:40 +0200
commit61fb9c1596ea220a0a8106160c5c68f9343ff9df (patch)
tree136126cc057bc58000f020990e32685c89adf399 /system/libraries/Upload.php
parent037944e6c2083ce82ef5785947fddbf671362006 (diff)
parent47b673324f06236264ca64f8c3155aab51762609 (diff)
Merge branch 'develop' of https://github.com/EllisLab/CodeIgniter into issue_1374
Conflicts: user_guide_src/source/changelog.rst
Diffstat (limited to 'system/libraries/Upload.php')
-rw-r--r--system/libraries/Upload.php21
1 files changed, 2 insertions, 19 deletions
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index e31029e49..c1e07de7a 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -78,6 +78,8 @@ class CI_Upload {
$this->initialize($props);
}
+ $this->mimes =& get_mimes();
+
log_message('debug', 'Upload Class Initialized');
}
@@ -113,7 +115,6 @@ class CI_Upload {
'image_type' => '',
'image_size_str' => '',
'error_msg' => array(),
- 'mimes' => array(),
'remove_spaces' => TRUE,
'xss_clean' => FALSE,
'temp_prefix' => 'temp_file_',
@@ -924,24 +925,6 @@ class CI_Upload {
*/
public function mimes_types($mime)
{
- global $mimes;
-
- if (count($this->mimes) === 0)
- {
- if (defined('ENVIRONMENT') && is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'))
- {
- $this->mimes = include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php');
- }
- elseif (is_file(APPPATH.'config/mimes.php'))
- {
- $this->mimes = include(APPPATH.'config/mimes.php');
- }
- else
- {
- return FALSE;
- }
- }
-
return isset($this->mimes[$mime]) ? $this->mimes[$mime] : FALSE;
}