diff --git a/file_entity.module b/file_entity.module index e99f5c0..e674ae8 100644 --- a/file_entity.module +++ b/file_entity.module @@ -6,13 +6,6 @@ */ /** - * The default list of file extensions allowed by file_save_upload(). - * - * Adds support for docx, xlsx, pptx and ppsx. - */ -define('FILE_ENTITY_DEFAULT_ALLOWED_EXTENSIONS', 'jpg jpeg gif png txt doc docx xls xlsx pdf ppt pptx pps ppsx odt ods odp'); - -/** * Modules should return this value from hook_file_entity_access() to allow * access to a file. */ diff --git a/file_entity.pages.inc b/file_entity.pages.inc index 57f91d0..c3c17eb 100644 --- a/file_entity.pages.inc +++ b/file_entity.pages.inc @@ -546,7 +546,7 @@ function file_entity_get_upload_validators(array $options = array()) { $validators['file_validate_extensions'] = array($options['file_extensions']); } else { - $validators['file_validate_extensions'] = array(FILE_ENTITY_DEFAULT_ALLOWED_EXTENSIONS); + $validators['file_validate_extensions'] = variable_get('file_entity_default_allowed_extensions', array('jpg, jpeg, gif, png, txt, doc, docx, xls, xlsx, pdf, ppt, pptx, pps, ppsx, odt, ods, odp')); } // Validate file size but do not allow anything higher than file_upload_max_size().