mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-29 06:23:01 +00:00
Fix missing file extension when uploading file
This commit is contained in:
parent
bcb53c6eb7
commit
9e515e45e2
3 changed files with 3 additions and 3 deletions
|
@ -2331,7 +2331,7 @@ register_module([
|
||||||
|
|
||||||
// Override the detected file extension if a file extension
|
// Override the detected file extension if a file extension
|
||||||
// is explicitly specified in the settings
|
// 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];
|
$file_extension = $settings->mime_mappings_overrides[$mime_type];
|
||||||
|
|
||||||
if(in_array($file_extension, [ "php", ".htaccess", "asp" ]))
|
if(in_array($file_extension, [ "php", ".htaccess", "asp" ]))
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
"author": "Starbeamrainbowlabs",
|
"author": "Starbeamrainbowlabs",
|
||||||
"description": "Adds the ability to upload files to Pepperminty Wiki. Uploaded files act as pages and have the special 'File:' prefix.",
|
"description": "Adds the ability to upload files to Pepperminty Wiki. Uploaded files act as pages and have the special 'File:' prefix.",
|
||||||
"id": "feature-upload",
|
"id": "feature-upload",
|
||||||
"lastupdate": 1459606415,
|
"lastupdate": 1459607200,
|
||||||
"optional": false
|
"optional": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -103,7 +103,7 @@ register_module([
|
||||||
|
|
||||||
// Override the detected file extension if a file extension
|
// Override the detected file extension if a file extension
|
||||||
// is explicitly specified in the settings
|
// 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];
|
$file_extension = $settings->mime_mappings_overrides[$mime_type];
|
||||||
|
|
||||||
if(in_array($file_extension, [ "php", ".htaccess", "asp" ]))
|
if(in_array($file_extension, [ "php", ".htaccess", "asp" ]))
|
||||||
|
|
Loading…
Reference in a new issue