[pmwiki-users] Update not deleting
The Editor
editor at fast.st
Wed Oct 11 17:45:13 CDT 2006
On 10/11/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Wed, Oct 11, 2006 at 04:16:28PM -0400, The Editor wrote:
> > I have the following lines of code properly being triggered in ZAP and
> > using the proper pagename (I've debugged that far). Unfortunately it
> > won't delete the page, using UpdatePage. I get the error message at
> > the bottom. Is there a proper function to delete the page--and still
> > save the history information? Evidently setting the page text to
> > "delete" doesn't work...
>
> Setting the page text to "delete" should work. The error message
> you're getting indicates that PmWiki is unable to write to the
> wiki.d/ directory, which indicates a permissions problem somewhere
> on wiki.d/ .
>
> Pm
Not sure what was going on, but it seems to be getting past the error
message now. However--when I use these lines of code, it gives the
proper message that "Page <Group>.<Name> has been deleted.", but there
on the pagelist, it still exists, and I can browse to it. Any ideas
why it is not deleting?
Here is the full code.
if ($field == "destroy") {
$p = explode(",", $value);
foreach($p as $pp) {
$pp = ZAPfixpage($pp);
if ($pp != $pagename) {
$oldpage = ReadPage($pp);
$newpage = $oldpage;
$newpage['text'] = "delete";
UpdatePage($d, $oldpage, $newpage);
$m .= "Page $pp has been deleted. ";
}
}
}
More information about the pmwiki-users
mailing list