mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-25 17:23:00 +00:00
made json pretty print in the page index when deleting a page
This commit is contained in:
parent
19241a8128
commit
f21d077312
2 changed files with 2 additions and 2 deletions
2
core.php
2
core.php
|
@ -538,7 +538,7 @@ switch($_GET["action"])
|
||||||
<p><a href='index.php?action=view&page=$page'>Click here to go back.</a>"));
|
<p><a href='index.php?action=view&page=$page'>Click here to go back.</a>"));
|
||||||
}
|
}
|
||||||
unset($pageindex->$page); //delete the page from the page index
|
unset($pageindex->$page); //delete the page from the page index
|
||||||
file_put_contents("./pageindex.json", json_encode($pageindex)); //save the new page index
|
file_put_contents("./pageindex.json", json_encode($pageindex, JSON_PRETTY_PRINT)); //save the new page index
|
||||||
unlink("./$page.md"); //delete the page from the disk
|
unlink("./$page.md"); //delete the page from the disk
|
||||||
|
|
||||||
exit(renderpage("Deleting $page - $sitename", "<p>$page has been deleted. <a href='index.php'>Go back to the main page</a>.</p>"));
|
exit(renderpage("Deleting $page - $sitename", "<p>$page has been deleted. <a href='index.php'>Go back to the main page</a>.</p>"));
|
||||||
|
|
|
@ -653,7 +653,7 @@ switch($_GET["action"])
|
||||||
<p><a href='index.php?action=view&page=$page'>Click here to go back.</a>"));
|
<p><a href='index.php?action=view&page=$page'>Click here to go back.</a>"));
|
||||||
}
|
}
|
||||||
unset($pageindex->$page); //delete the page from the page index
|
unset($pageindex->$page); //delete the page from the page index
|
||||||
file_put_contents("./pageindex.json", json_encode($pageindex)); //save the new page index
|
file_put_contents("./pageindex.json", json_encode($pageindex, JSON_PRETTY_PRINT)); //save the new page index
|
||||||
unlink("./$page.md"); //delete the page from the disk
|
unlink("./$page.md"); //delete the page from the disk
|
||||||
|
|
||||||
exit(renderpage("Deleting $page - $sitename", "<p>$page has been deleted. <a href='index.php'>Go back to the main page</a>.</p>"));
|
exit(renderpage("Deleting $page - $sitename", "<p>$page has been deleted. <a href='index.php'>Go back to the main page</a>.</p>"));
|
||||||
|
|
Loading…
Reference in a new issue