[pmwiki-devel] RFC: Configurable redirect in PmForm

DaveG pmwiki at solidgone.com
Wed Mar 31 22:13:10 CDT 2010


In PmForm HandlePmForm(), a Redirect() is performed at the end of 
processing. This prohibits additional cookbook processing after PmForm. 
Specifically it means that any Ajax oriented PmForm requests are not 
possible.

My proposal is below, although I'm open to any change that allows 
re-directing to a cookbook defined function.


--- Proposal
Change to PmForm, last line in HandlePmForm() from:
   Redirect($pagename, '{$PageUrl}?pmform=success');

To:
   $PmFormRedirect('success');


And the addition of a function:
   function PmFormRedirect($msg){
   global $pagename;
     Redirect($pagename, '{$PageUrl}?pmform='.$msg);
   }

And at the start of PmForm, the initialization of the new variable:
    SDV($PmFormRedirect,'PmFormRedirect');


I'm not too concerned with redirects on error handling, as it's possible 
to check $MessageFmt, but suggestions welcome.

I'll create a PITS based on the outcome of whatever discussions occur.


  ~ ~ Dave



More information about the pmwiki-devel mailing list