[pmwiki-users] Can any of the form recipes do this?
Patrick R. Michaud
pmichaud at pobox.com
Mon Apr 2 17:12:33 CDT 2007
On Mon, Apr 02, 2007 at 11:05:16PM +0100, Hans wrote:
> $page['pwedit'] = "id:".$fields['author'];
>
> can be written into both pages.
>
> It goes a bit beyond what Fox's filters wee meant for, i.e. manipulate
> input field values, as $page['pwedit'] should be written after the
> pages are created.
FWIW, it can be written *as* the pages are created -- it doesn't
have to be afterwards. And you would want to set
$page['passwdedit'] = 'id:'.$fields['author'];
Still better would be:
if ($AuthId) $page['passwdedit'] = "id:$AuthId";
which absolutely constrains things so that the person creating
the page is the one with edit privileges, and you don't
have to blindly trust the value of $fields['author'].
Pm
More information about the pmwiki-users
mailing list