1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-22 04:23:01 +00:00

Move save preprocessor handling to after metadata calculation

This commit is contained in:
Starbeamrainbowlabs 2015-10-03 10:18:26 +01:00
parent 8e627c552c
commit faaa2a21ac

View file

@ -111,12 +111,6 @@ register_module([
$pagedata = htmlentities($_POST["content"], ENT_QUOTES);
// Execute all the preprocessors
foreach($save_preprocessors as $func)
{
$func($pagedata);
}
if(file_put_contents("$env->page.md", $pagedata) !== false)
{
$page = $env->page;
@ -136,6 +130,14 @@ register_module([
else
$pageindex->$page->lasteditor = utf8_encode("anonymous");
// Execute all the preprocessors
foreach($save_preprocessors as $func)
{
$func($pageindex->$page, $pagedata);
}
file_put_contents("./pageindex.json", json_encode($pageindex, JSON_PRETTY_PRINT));
if(isset($_GET["newpage"]))