[pmwiki-devel] UpdatePage problem

The Editor editor at fast.st
Fri Jan 5 11:20:18 CST 2007


On 1/5/07, Dominique Faure <dominique.faure at gmail.com> wrote:
> On 1/5/07, The Editor <editor at fast.st> wrote:
> > I'm trying to update the zapnews module to work with ZAP 2007 and I'm
> > getting a strange problem.  The UpdatePage command is giving me the
> > php white screen of death.  When I comment out these two lines, the
> > page loads fine.
> >
> > I had this working fine before, and only had to update a few unrelated
> > lines (plus add a bit of new functionality--prescheduling
> > newsletters!), but didn't change these lines.  But for the life of me
> > I can't figure out what is wrong.
> >
> > //    UpdatePage("$g.$pp", $oldqueue, $newqueue);
> > //    UpdatePage("$g.LOG-$id", $oldlog, $newlog);
> >
>
> UpdatePage function has evolved in latest beta...
>
> ## UpdatePage goes through all of the steps needed to update a page,
> ## preserving page history, computing link targets, page titles,
> ## and other page attributes.  It does this by calling each entry
> ## in $EditFunctions.  $pagename is the name of the page to be updated,
> ## $page is the old version of the page (used for page history),
> ## $new is the new version of the page to be saved, and $fnlist is
> ## an optional list of functions to use instead of $EditFunctions.
> function UpdatePage(&$pagename, &$page, &$new, $fnlist = NULL) {
>
>
> ...and you're passing a string where a variable refererence is now
> expected. You should change your code accordingly, as for example:
>
> ...
> $pagename = "$g.$pp";
> UpdatePage($pagename, $oldqueue, $newqueue);
> ...
> $pagename = "$g.LOG-$id";
> UpdatePage($pagename, $oldlog, $newlog);
> ...
>
> Regards,
> Dom


Thanks Dom, that solved the problem!

Cheers,
Dan



More information about the pmwiki-devel mailing list