mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-25 05:22:59 +00:00
Move save preprocessor handling to after metadata calculation
This commit is contained in:
parent
8e627c552c
commit
faaa2a21ac
1 changed files with 8 additions and 6 deletions
|
@ -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"]))
|
||||
|
|
Loading…
Reference in a new issue