diff options
-rw-r--r-- | includes/file.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/file.inc b/includes/file.inc index a1232f1e9..0f2bce694 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -155,7 +155,7 @@ function file_check_upload($source) { else { $file->filemime = $_FILES["edit"]["type"][$source]; } - if (((substr($file->filemime, 0, 5) == 'text/' || strpos($file->filemime, 'javascript')) && (substr($file->filepath, -4) != '.txt')) || preg_match('/\.(php|pl|py|cgi|asp)$/i', $file->filename)) { + if (((substr($file->filemime, 0, 5) == 'text/' || strpos($file->filemime, 'javascript')) && (substr($file->filename, -4) != '.txt')) || preg_match('/\.(php|pl|py|cgi|asp)$/i', $file->filename)) { $file->filemime = 'text/plain'; rename($file->filepath, $file->filepath .'.txt'); $file->filepath .= '.txt'; |