1
0
Fork 0
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:
Starbeamrainbowlabs 2015-10-25 11:11:41 +00:00
parent 7577a6669c
commit 3e47422cc6
3 changed files with 3 additions and 5 deletions

View file

@ -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";

View file

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

View file

@ -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";