diff --git a/build/index.php b/build/index.php index 540b7a7..82a2019 100644 --- a/build/index.php +++ b/build/index.php @@ -1309,7 +1309,7 @@ register_module([ $file_extension = system_mime_type_extension($mime_type); $new_filename = "Files/$target_name.$file_extension"; - $new_description_filename = "Files/$target_name.md"; + $new_description_filename = "$new_filename.md"; if(isset($pageindex->$new_filename)) exit(page_renderer::render("Upload Error - $settings->sitename", "
A page or file has already been uploaded with the name '$new_filename'. Try deleting it first. If you do not have permission to delete things, try contacting one of the moderators.
")); diff --git a/module_index.json b/module_index.json index 9e4316c..55ccbf1 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": 1445500347, + "lastupdate": 1445500627, "optional": false }, { diff --git a/modules/feature-upload.php b/modules/feature-upload.php index fdae758..3d998b5 100644 --- a/modules/feature-upload.php +++ b/modules/feature-upload.php @@ -88,7 +88,7 @@ register_module([ $file_extension = system_mime_type_extension($mime_type); $new_filename = "Files/$target_name.$file_extension"; - $new_description_filename = "Files/$target_name.md"; + $new_description_filename = "$new_filename.md"; if(isset($pageindex->$new_filename)) exit(page_renderer::render("Upload Error - $settings->sitename", "A page or file has already been uploaded with the name '$new_filename'. Try deleting it first. If you do not have permission to delete things, try contacting one of the moderators.
"));