summaryrefslogtreecommitdiffstats
path: root/system/libraries/Upload.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2013-10-21 14:35:05 +0200
committerAndrey Andreev <narf@devilix.net>2013-10-21 14:35:05 +0200
commit32c7212edb0488524a0eece98cb1e2321ee90c29 (patch)
treee4e804ed42272e720cad4cc7a6c5fd85b42aec85 /system/libraries/Upload.php
parent72b4b3cbc71d2c266938b8878baba11c11c565ca (diff)
Add CI_Upload:: option
Diffstat (limited to 'system/libraries/Upload.php')
-rw-r--r--system/libraries/Upload.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 060973847..7989d113e 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -234,6 +234,13 @@ class CI_Upload {
public $xss_clean = FALSE;
/**
+ * Apache mod_mime fix flag
+ *
+ * @var bool
+ */
+ public $mod_mime_fix = TRUE;
+
+ /**
* Temporary filename prefix
*
* @var string
@@ -314,6 +321,7 @@ class CI_Upload {
'remove_spaces' => TRUE,
'detect_mime' => TRUE,
'xss_clean' => FALSE,
+ 'mod_mime_fix' => TRUE,
'temp_prefix' => 'temp_file_',
'client_name' => ''
);
@@ -1148,7 +1156,7 @@ class CI_Upload {
*/
protected function _prep_filename($filename)
{
- if (strpos($filename, '.') === FALSE OR $this->allowed_types === '*')
+ if ($this->mod_mime_fix === FALSE OR $this->allowed_types === '*' OR strpos($filename, '.') === FALSE)
{
return $filename;
}