1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-06-18 02:44:55 +00:00

Fix missing file extension when uploading file

This commit is contained in:
Starbeamrainbowlabs 2016-04-02 19:23:22 +01:00
parent bcb53c6eb7
commit 9e515e45e2
3 changed files with 3 additions and 3 deletions

View file

@ -2331,7 +2331,7 @@ register_module([
// Override the detected file extension if a file extension
// is explicitly specified in the settings
if(isset($settings->mime_mappings_overrides))
if(isset($settings->mime_mappings_overrides[$mime_type]))
$file_extension = $settings->mime_mappings_overrides[$mime_type];
if(in_array($file_extension, [ "php", ".htaccess", "asp" ]))

View file

@ -68,7 +68,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": 1459606415,
"lastupdate": 1459607200,
"optional": false
},
{

View file

@ -103,7 +103,7 @@ register_module([
// Override the detected file extension if a file extension
// is explicitly specified in the settings
if(isset($settings->mime_mappings_overrides))
if(isset($settings->mime_mappings_overrides[$mime_type]))
$file_extension = $settings->mime_mappings_overrides[$mime_type];
if(in_array($file_extension, [ "php", ".htaccess", "asp" ]))