Ignore:
Timestamp:
Dec 30, 2015 5:11:44 AM (8 years ago)
Author:
anonymous
Message:

Minor fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Upload.inc.php

    r530 r558  
    276276            // Check to be sure the file has a valid file name extension.
    277277            if (!in_array(mb_strtolower(self::getFilenameExtension($file_name)), $this->getParam('valid_file_extensions'))) {
    278                 // TODO: Add option to allow any extention to be uploaded.
     278                // TODO: Add option to allow any extension to be uploaded.
    279279                $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__);
    280280                $app->logMsg(sprintf('The uploaded file %s has an unrecognized file name extension.', $file_name), LOG_WARNING, __FILE__, __LINE__);
     
    293293            // If the file name has no extension, use the mime-type to choose one.
    294294            if (!preg_match('/\.[^.]{1,5}$/', $file_name) && function_exists('mime_content_type')) {
    295                 // TODO: will this run if an extention is filtered by 'valid_file_extensions'?
     295                // TODO: will this run if an extension is filtered by 'valid_file_extensions'?
    296296                if ($ext = array_search(mime_content_type($files['tmp_name'][$i]), $this->mime_extension_map)) {
    297297                    $file_name .= ".$ext";
Note: See TracChangeset for help on using the changeset viewer.