diff --git a/codepot/src/codepot/controllers/file.php b/codepot/src/codepot/controllers/file.php index d1f468a2..d7c23d2d 100644 --- a/codepot/src/codepot/controllers/file.php +++ b/codepot/src/codepot/controllers/file.php @@ -289,7 +289,8 @@ class File extends Controller $_FILES['file_name']['type'] = str_replace('\\', '', $_FILES['file_name']['type']); - $config['allowed_types'] = $ext; + //$config['allowed_types'] = $ext; + $config['allowed_types'] = '*'; $config['upload_path'] = CODEPOT_FILE_DIR; $config['max_size'] = CODEPOT_MAX_UPLOAD_SIZE; $config['encrypt_name'] = TRUE; diff --git a/codepot/src/codepot/controllers/wiki.php b/codepot/src/codepot/controllers/wiki.php index 5e72516a..5f48b27a 100644 --- a/codepot/src/codepot/controllers/wiki.php +++ b/codepot/src/codepot/controllers/wiki.php @@ -643,7 +643,8 @@ class Wiki extends Controller $_FILES[$field_name]['type'] = str_replace('\\', '', $_FILES[$field_name]['type']); - $config['allowed_types'] = $ext; + //$config['allowed_types'] = $ext; + $config['allowed_types'] = '*'; $config['upload_path'] = CODEPOT_ATTACHMENT_DIR; $config['max_size'] = CODEPOT_MAX_UPLOAD_SIZE; $config['encrypt_name'] = TRUE; diff --git a/codepot/src/system/libraries/Upload.php b/codepot/src/system/libraries/Upload.php index a97b7bdf..1a9aab22 100644 --- a/codepot/src/system/libraries/Upload.php +++ b/codepot/src/system/libraries/Upload.php @@ -578,6 +578,11 @@ class CI_Upload { $this->set_error('upload_no_file_types'); return FALSE; } + + if($this->allowed_types[0] == '*') + { + return true; + } $ext = strtolower(ltrim($this->file_ext, '.')); @@ -967,4 +972,4 @@ class CI_Upload { // END Upload Class /* End of file Upload.php */ -/* Location: ./system/libraries/Upload.php */ \ No newline at end of file +/* Location: ./system/libraries/Upload.php */