diff --git a/build/index.php b/build/index.php index a432a22..761556c 100644 --- a/build/index.php +++ b/build/index.php @@ -1280,7 +1280,7 @@ register_module([ $target_name = makepathsafe($_POST["name"]); $temp_filename = $_FILES["file"]["tmp_name"]; - $mimechecker = new finfo(FILEINFO_MIME_TYPE); + $mimechecker = finfo_open(FILEINFO_MIME_TYPE); $mime_type = finfo_file($mimechecker, $temp_filename); // Perform appropriate checks based on the *real* filetype @@ -1300,7 +1300,7 @@ register_module([ exit(page_renderer::render("Upload Error - $settings->sitename", "
You uploaded a video, but $settings->sitename doesn't support them yet. Please try again later.
")); default: - exit(page_renderer::render("Upload Error - $settings->sitename", "You uploaded an unnknown file type which couldn't be processed. $settings->sitename thinks that the file you uploaded was a(n) $mime_type, which isn't supported.
")); + exit(page_renderer::render("Upload Error - $settings->sitename", "You uploaded an unnknown file type which couldn't be processed. $settings->sitename thinks that the file you uploaded was a(n) '$mime_type', which isn't supported.
")); } $file_extension = system_mime_type_extension($mime_type); diff --git a/module_index.json b/module_index.json index 4cc1bcf..0c11324 100644 --- a/module_index.json +++ b/module_index.json @@ -50,7 +50,7 @@ "author": "Starbeamrainbowlabs", "description": "Adds the ability to upload files to Pepperminty Wiki. Uploaded files act as pages and have the special 'File:' prefix.", "id": "feature-upload", - "lastupdate": 1445499647, + "lastupdate": 1445499784, "optional": false }, { diff --git a/modules/feature-upload.php b/modules/feature-upload.php index 4ce9b02..acb9bbe 100644 --- a/modules/feature-upload.php +++ b/modules/feature-upload.php @@ -62,7 +62,7 @@ register_module([ $target_name = makepathsafe($_POST["name"]); $temp_filename = $_FILES["file"]["tmp_name"]; - $mimechecker = new finfo(FILEINFO_MIME_TYPE); + $mimechecker = finfo_open(FILEINFO_MIME_TYPE); $mime_type = finfo_file($mimechecker, $temp_filename); // Perform appropriate checks based on the *real* filetype @@ -82,7 +82,7 @@ register_module([ exit(page_renderer::render("Upload Error - $settings->sitename", "You uploaded a video, but $settings->sitename doesn't support them yet. Please try again later.
")); default: - exit(page_renderer::render("Upload Error - $settings->sitename", "You uploaded an unnknown file type which couldn't be processed. $settings->sitename thinks that the file you uploaded was a(n) $mime_type, which isn't supported.
")); + exit(page_renderer::render("Upload Error - $settings->sitename", "You uploaded an unnknown file type which couldn't be processed. $settings->sitename thinks that the file you uploaded was a(n) '$mime_type', which isn't supported.
")); } $file_extension = system_mime_type_extension($mime_type);