diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-11-30 19:28:18 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-11-30 19:28:18 +0000 |
commit | fe017623877aec5b2d48776f289ea27efad870f7 (patch) | |
tree | 7d867487e603a0cc3f6e6d06e88a9bb5e88d3fee | |
parent | f8b90f62629a3672c5a50a53c6e7447e37d0865d (diff) | |
download | brdo-fe017623877aec5b2d48776f289ea27efad870f7.tar.gz brdo-fe017623877aec5b2d48776f289ea27efad870f7.tar.bz2 |
- Fixed bug with checking for .txt files.
-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'; |