Skip to content

Commit

Permalink
added: if fabrikdebug=2 then show a message with the redirect url as …
Browse files Browse the repository at this point in the history
…a link
  • Loading branch information
pollen8 committed May 13, 2016
1 parent 19c196e commit b60c491
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions components/com_fabrik/controllers/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,22 +263,24 @@ public function process()
return;
}

$url = $this->getRedirectURL($model);
$msg = $this->getRedirectMessage($model);

/**
* If debug submit is requested (&fabrikdebug=2, and J! debug on, and Fabrik debug allowed),
* bypass any and all redirects, so we can see the profile for the submit
*/

if (FabrikHelperHTML::isDebugSubmit())
{
echo '<p>' . $msg . '</p>';
echo '<p>Form submission profiling has stopped the automatic redirect. </p>';
echo '<a href="' . $url . '">continue to redirect URL</a>';
return;
}

$listModel = $model->getListModel();
$listModel->set('_table', null);

$url = $this->getRedirectURL($model);
$msg = $this->getRedirectMessage($model);

// @todo -should get handed off to the json view to do this
if ($input->getInt('fabrik_ajax') == 1)
{
Expand Down

0 comments on commit b60c491

Please sign in to comment.