[pmwiki-devel] PostPage in recipe

Frank Schweickert f.schweickert at uva.nl
Sun Mar 29 04:43:01 CDT 2009


I want to alter existing wiki pages by calling PostPage()
directly in an included recipe,
but this seems to strip all diff history entries from those pages!

Can it be that global $DiffKeepDays, $DiffFunction are not set yet 
during recipe inclusion in config.php? (I figured that out from index.php)

So can I only call PostPage() during the markup process using Markup()?

I actually wanted to use PostPage() within a custom page action.

What I did for testing:

if ($action == 'ejselements') {
  $old = RetrieveAuthPage('Test.Page1', 'read');
  $new = $old;
  $new[text] = "x".$old[text];
  $IsPagePosted = false;
  PostPage('Test.Page1',$old,$new);
}

The "x" is prepended to the wiki markup, but the history is gone.

I'm also grateful for general recommendations for further reading into
pmwiki's internal workings...

Frank







More information about the pmwiki-devel mailing list