1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-22 04:23:01 +00:00

Tweak the uploaded filename

This commit is contained in:
Starbeamrainbowlabs 2015-10-22 08:59:03 +01:00
parent 093960133b
commit fea2a8b004
3 changed files with 3 additions and 3 deletions

View file

@ -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", "<p>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.</p>"));

View file

@ -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
},
{

View file

@ -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", "<p>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.</p>"));