[pmwiki-devel] PostPage in recipe
Frank Schweickert
f.schweickert at uva.nl
Sun Mar 29 16:43:08 CDT 2009
Thank you, Peter and Hans, for your help!
> Peter Bowers wrote: I didn't see exactly what you meant about the
> markup process being broken,
Sorry, in the meantime I put "exit;" after my convert page action with
UploadPage() , for I actually don't need to see the page. My action
would correct wiki markup on some hundred pages at once on behalf of an
administrator.
(Without exit, I would run into the rest of normal view action, but even
Sidebar, GroupFooter or PageActions had been processed only halfway
leaving raw wiki markup in the template)
> Hans wrote: Perhaps you need to call HandleBrowse or HandleDispatch
> to see the page after the update.
> Peter Bowers wrote: but I did see the error about needing an array on
> line 1650 and 1651. That comes from $SaveAttributes not being
> initialized.
Also, this sounds complicated for what I thought was a simple task of
rewriting raw markup of existing pages via script. UpdatePage calls all
these $EditFunctions, why not proper initialization? I mean from the
description of UpdatePage ("mimic the behavior of editing wiki pages via
the browser)" I would expect that it could create the correct context by
itself... As to my understanding right now, UpdatePage is NOT a
function that is safe to be used directly in config.php includes. And
since I need to change the whole page I wouldn't know how to use
Markup() to call it later in the view process.
Markup('/(.*)/se','fulltext,...) didn't do the trick, for instance.
>> $old = RetrieveAuthPage('Test.Page1', 'read'); $new = $old;
>> $new['text'] = "x".$old['text']; $pn='Test.Page1';
>> UpdatePage($pn,$old,$new);
> Hans wrote: I does look okay to me.
But the history is still not being updated as you can see from my example
http://www.natsim.net/ejswiki/Test/Page1
I was hoping to leave some trace as user "frankobot" or so. That would
make it easier to recover in some ambiguous cases of my conversion
(luxury indeed - I actually strive for grasping the correct usage of
internal PMwiki functions)
Frank
--
_______________________________________________________________________
Dr. Frank F. Schweickert
AMSTEL Institute, Faculty of Science, University of Amsterdam
Kruislaan 404, Amsterdam, 1098 SM, Netherlands
Room 1.09
Phone: +31 20 525-5969, Fax: +31 20 525-5866
http://www.science.uva.nl/amstel
http://www.natsim.net
More information about the pmwiki-devel
mailing list