mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-12-22 13:45:02 +00:00
Tidy up page moving code a tad
This commit is contained in:
parent
7577a6669c
commit
3e47422cc6
3 changed files with 3 additions and 5 deletions
|
@ -2215,8 +2215,7 @@ register_module([
|
|||
unset($pageindex->$page);
|
||||
$pageindex->$new_name->filename = $new_name;
|
||||
// If this page has an associated file, then we should move that too
|
||||
if(isset($pageindex->$new_name->uploadedfile) and
|
||||
$pageindex->$new_name->uploadedfile == true)
|
||||
if(!empty($pageindex->$new_name->uploadedfile))
|
||||
{
|
||||
// Update the filepath to point to the description and not the image
|
||||
$pageindex->$new_name->filename = $pageindex->$new_name->filename . ".md";
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
"author": "Starbeamrainbowlabs",
|
||||
"description": "Adds an action to allow administrators to move pages.",
|
||||
"id": "page-move",
|
||||
"lastupdate": 1445771285,
|
||||
"lastupdate": 1445771483,
|
||||
"optional": false
|
||||
},
|
||||
{
|
||||
|
|
|
@ -55,8 +55,7 @@ register_module([
|
|||
unset($pageindex->$page);
|
||||
$pageindex->$new_name->filename = $new_name;
|
||||
// If this page has an associated file, then we should move that too
|
||||
if(isset($pageindex->$new_name->uploadedfile) and
|
||||
$pageindex->$new_name->uploadedfile == true)
|
||||
if(!empty($pageindex->$new_name->uploadedfile))
|
||||
{
|
||||
// Update the filepath to point to the description and not the image
|
||||
$pageindex->$new_name->filename = $pageindex->$new_name->filename . ".md";
|
||||
|
|
Loading…
Reference in a new issue