hi Peter
thanks

i actually just figured this part out (sort of) - i saw that in Fox, Hans made his UpdatePage() function work by limiting which functions it calls, by throwing the wanted function(s) into a 4th slot '$fnlist' - UpdatePage($pagename, $old, $new, $fnlist) i found that throwing in something like array('SaveAttributes') seemed to prevent the errors.

however, once that proved errorless, i was saddened to find that UpdatePage & SaveAttributes are not the problem, so my quest continues (see the next post : )

thanks for the help!
adam


On 16 Jun 2009, at 3:40 PM, Peter Bowers wrote:

On Tue, Jun 16, 2009 at 4:29 PM, adam overton <[email protected]> wrote:
...
the workaround that i thought could work but currently gives me errors goes something like this - instead of having fox/foxedit redirect=1 (i.e. to the same page), have it redirect to the same page with ?action=updatePage where the appropriate functions are called. here's my code in config.php:

if ($action=="updatePage") {
        $thispage = ReadPage($pagename);

        //WritePage($pagename, $thispage);
        UpdatePage($pagename, $thispage, $thispage);

I can't speak to the rest of it, but I know I had a bit of a go- round with UpdatePage() being called in config.php (back in March, but it looks like a lot of the discussion was off-list). My conclusion was that UpdatePage() requires certain variables to be set before it can be called and those initializations occur after config.php is called. I "peeled a couple layers" trying to manually do the initializations in config.php before calling UpdatePage() and then determined I needed to pursue an alternate solution...

Quoting from http://www.pmwiki.org/wiki/PmWiki/Functions:

UpdatePage() cannot be called directly from config.php because there are necessary initializations which occur later in pmwiki.php. It is not enough to just load stdconfig.php. If you want to use UpdatePage() you will need to do it within a custom markup, a custom markup expression, or a custom action.

-Peter

_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to