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

_______________________________________________
pmwiki-devel mailing list
pmwiki-devel@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel

Reply via email to