Changeset 558 for trunk/lib/Upload.inc.php
- Timestamp:
- Dec 30, 2015 5:11:44 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Upload.inc.php
r530 r558 276 276 // Check to be sure the file has a valid file name extension. 277 277 if (!in_array(mb_strtolower(self::getFilenameExtension($file_name)), $this->getParam('valid_file_extensions'))) { 278 // TODO: Add option to allow any exten tion to be uploaded.278 // TODO: Add option to allow any extension to be uploaded. 279 279 $this->_raiseMsg(sprintf(_("The file %s failed uploading: it is an unrecognized type. Files must have one of the following file name extensions: %s."), $file_name, join(', ', $this->getParam('valid_file_extensions'))), MSG_ERR, __FILE__, __LINE__); 280 280 $app->logMsg(sprintf('The uploaded file %s has an unrecognized file name extension.', $file_name), LOG_WARNING, __FILE__, __LINE__); … … 293 293 // If the file name has no extension, use the mime-type to choose one. 294 294 if (!preg_match('/\.[^.]{1,5}$/', $file_name) && function_exists('mime_content_type')) { 295 // TODO: will this run if an exten tion is filtered by 'valid_file_extensions'?295 // TODO: will this run if an extension is filtered by 'valid_file_extensions'? 296 296 if ($ext = array_search(mime_content_type($files['tmp_name'][$i]), $this->mime_extension_map)) { 297 297 $file_name .= ".$ext";
Note: See TracChangeset
for help on using the changeset viewer.