1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-06-26 17:24:56 +00:00

Bugfix: update the filename when moving page

This commit is contained in:
Starbeamrainbowlabs 2015-10-25 11:09:26 +00:00
parent 7d3d190661
commit fe978fa980

View file

@ -53,10 +53,13 @@ register_module([
$pageindex->$new_name->$key = $value; $pageindex->$new_name->$key = $value;
} }
unset($pageindex->$page); unset($pageindex->$page);
$pageindex->$new_name->filename = $new_name;
// If this page has an associated file, then we should move that too // If this page has an associated file, then we should move that too
if(isset($pageindex->$new_name->uploadedfile) and if(isset($pageindex->$new_name->uploadedfile) and
$pageindex->$new_name->uploadedfile == true) $pageindex->$new_name->uploadedfile == true)
{ {
// Update the filepath to point to the description and not the image
$pageindex->$new_name->filename = $pageindex->$new_name->filename . ".md";
// Move the file in the pageindex // Move the file in the pageindex
$pageindex->$new_name->uploadedfilepath = $new_name; $pageindex->$new_name->uploadedfilepath = $new_name;
// Move the file on disk // Move the file on disk