[pmwiki-users] WritePage question
Tom Lederer
celok at gmx.net
Sat Sep 16 17:16:14 CDT 2006
Am 16.09.2006 um 22:40 schrieb Patrick R. Michaud:
> On Sat, Sep 16, 2006 at 06:38:57PM +0200, Tom Lederer wrote:
>> Hi all,
>>
>> i want to write a script which allows non logged in users to edit
>> something.
>> Of the security issue i am well aware :)
>>
>> However i lose the history. [...]
>
> WritePage() is a low-level function that simply writes whatever
> it's told to write. WritePage() doesn't create or maintain
> page histories, update RecentChanges, etc.
>
> To update a page with a page history, one currently has to
> call PostPage() (which requires a couple of extra functions).
>
> It's also possible to call HandleEdit() directly, which
> (with the correct parameters set) can perform a post just as
> if it were coming from a browser.
Thanks for the quick answer.
I tried to do a $POST request first, but did not get it to work
disregarding the current user auth level. Is there a simple way to
call this, so that the page gets updated?
Before i tried:
$_POST['text'] = (join("\n", $text));
$_POST['post'] = 'Save ';
$handle = $HandleActions['edit'];
return $handle($pagename);
But as i said, i don't know how to call it for a user that is not
logged in (noticed that it works for an logged in edit user fine, but
not for a non logged in user.).
Would be really happy, if you could tell me, if and how this could
work :)
Best Regards,
Tom
--
Tom
http://www.celok.de
http://www.frappr.com/celok
More information about the pmwiki-users
mailing list