mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 16:33:00 +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);
|
unset($pageindex->$page);
|
||||||
$pageindex->$new_name->filename = $new_name;
|
$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(!empty($pageindex->$new_name->uploadedfile))
|
||||||
$pageindex->$new_name->uploadedfile == true)
|
|
||||||
{
|
{
|
||||||
// Update the filepath to point to the description and not the image
|
// Update the filepath to point to the description and not the image
|
||||||
$pageindex->$new_name->filename = $pageindex->$new_name->filename . ".md";
|
$pageindex->$new_name->filename = $pageindex->$new_name->filename . ".md";
|
||||||
|
|
|
@ -131,7 +131,7 @@
|
||||||
"author": "Starbeamrainbowlabs",
|
"author": "Starbeamrainbowlabs",
|
||||||
"description": "Adds an action to allow administrators to move pages.",
|
"description": "Adds an action to allow administrators to move pages.",
|
||||||
"id": "page-move",
|
"id": "page-move",
|
||||||
"lastupdate": 1445771285,
|
"lastupdate": 1445771483,
|
||||||
"optional": false
|
"optional": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -55,8 +55,7 @@ register_module([
|
||||||
unset($pageindex->$page);
|
unset($pageindex->$page);
|
||||||
$pageindex->$new_name->filename = $new_name;
|
$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(!empty($pageindex->$new_name->uploadedfile))
|
||||||
$pageindex->$new_name->uploadedfile == true)
|
|
||||||
{
|
{
|
||||||
// Update the filepath to point to the description and not the image
|
// Update the filepath to point to the description and not the image
|
||||||
$pageindex->$new_name->filename = $pageindex->$new_name->filename . ".md";
|
$pageindex->$new_name->filename = $pageindex->$new_name->filename . ".md";
|
||||||
|
|
Loading…
Reference in a new issue