[pmwiki-devel] UpdatePage and HandleEdit

Dominique Faure dominique.faure at gmail.com
Tue Dec 12 02:57:37 CST 2006


On 12/11/06, Hans <design5 at softflow.co.uk> wrote:
> Monday, December 11, 2006, 7:37:27 PM, Patrick wrote:
>
> > FWIW, PITS (which has a form that then becomes an edit page) simply
> > manipulates fields into $_POST['text'] and then calls HandleEdit().
>
> Hmmm. I can't find a call to HandleEdit in PITS.php.
> I can't understand how it opens in edit mode.
> It says:
>
> if ($action=='postpits') {
>   Lock(2);
>   foreach(ListPages('/^PITS\\.\\d/') as $i)
>     $issue = max(@$issue,substr($i,5));
>   $pagename = sprintf("PITS.%05d",@$issue+1);
>   $action = 'edit';
>   $_REQUEST['post'] = 1;
>   ...
>   $_POST['text'] = "
>   .....
>   .....";
> }
>

Surely because of the assignation:

$action = 'edit';

which occurs before the core $action processing, no?

Dom



More information about the pmwiki-devel mailing list