Skip to content

Commit

Permalink
Dev: moved function moveSubmitIfNeeded() to run function (and removed…
Browse files Browse the repository at this point in the history
… useless redata in signature)
  • Loading branch information
LouisGac committed Jan 31, 2017
1 parent 4a41f83 commit 09e19f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions application/helpers/SurveyRuntimeHelper.php
Expand Up @@ -111,6 +111,8 @@ public function run($surveyid,$args)

$this->setJavascriptVar($surveyid);
$aPrivateVariables = $this->setArgs();

$this->moveSubmitIfNeeded();
extract($aPrivateVariables); // For redata

// We really need to replace redata get_defined_vars by something else.
Expand Down Expand Up @@ -735,8 +737,6 @@ private function runPage()
$moveResult = $this->moveResult;
$totalquestions = $this->totalquestions = $_SESSION['survey_'.$this->surveyid]['totalquestions']; // Proabably for redata
$redata = compact(array_keys(get_defined_vars())); // must replace this by something better

$this->moveSubmitIfNeeded($redata);
}

/**
Expand Down Expand Up @@ -1253,7 +1253,7 @@ private function setNotAnsweredAndNotValidated()
/**
* Perform submit if asked by user
*/
private function moveSubmitIfNeeded($redata)
private function moveSubmitIfNeeded()
{
// retrieve datas from local variable
$surveyid = $this->surveyid;
Expand Down

0 comments on commit 09e19f5

Please sign in to comment.