Form controllers improvement

Form controllers are now able to return something other than true or
null. Whatever is returned by the form controller will be passed on by
the form if it isn't a boolean.
This commit is contained in:
Emmanuel BENOîT 2012-02-06 17:26:55 +01:00
parent c73baa8488
commit a1d327d465

View file

@ -64,8 +64,10 @@ class Ctrl_Form
if ( $cResult === null ) {
return $this->form->view( );
}
if ( $cResult ) {
if ( $cResult === true ) {
$url = $this->form->successURL( );
} elseif ( $cResult ) {
return $cResult;
} else {
$url = $this->form->cancelURL( );
}