Skip to content

Commit

Permalink
fixed form model getRedirectURL when in module mode would return a st…
Browse files Browse the repository at this point in the history
…ring - when array expected. Fixed module with ajax post turned off- validations would not show
  • Loading branch information
pollen8 committed Feb 19, 2013
1 parent da39d2f commit 9af5498
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions components/com_fabrik/models/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -2577,6 +2577,8 @@ public function validate()
/**
* Get form validation errors - if empty test session for errors
* 31/01/13 - no longer restoring from session errors - see http://fabrikar.com/forums/showthread.php?t=31377
* 19/02/13 - Changed from http refferer test to this->isMambot to restore session errors when redirecting from a non-ajax form
* in module that has failed validaiton - see http://fabrikar.com/forums/showthread.php?t=31870
*
* @return array errors
*/
Expand All @@ -2592,10 +2594,10 @@ public function getErrors()
$errors = array();
if (empty($this->_arErrors))
{
/* if (isset($_SERVER['HTTP_REFERER']))
if ($this->isMambot)
{
$errors = $session->get($context . 'errors', array());
} */
}
}
else
{
Expand Down Expand Up @@ -4966,7 +4968,7 @@ public function getRedirectURL($incSession = true, $isMambot = false)
$baseRedirect = true;
if (!$incSession)
{
return $url;
return array('url' => $url, 'baseRedirect' => $baseRedirect);
}
$session = JFactory::getSession();
$formdata = $session->get('com_' . $package . '.form.data');
Expand Down

0 comments on commit 9af5498

Please sign in to comment.