[pmwiki-users] FoxEdit & Category

Peter Bowers pbowers at pobox.com
Tue Jun 16 17:40:34 CDT 2009


On Tue, Jun 16, 2009 at 4:29 PM, adam overton <a at plus1plus1plus.org> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20090616/edb51603/attachment-0001.html 


More information about the pmwiki-users mailing list