Skip to content

Commit

Permalink
Fixed issue #8107: Poor error message when user loads previously save…
Browse files Browse the repository at this point in the history
…d survey
  • Loading branch information
c-schmitz committed Oct 19, 2013
1 parent a1672a7 commit a5e11ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 7 additions & 2 deletions application/controllers/survey/index.php
Expand Up @@ -419,8 +419,13 @@ function sendreq(surveyid)
$_SESSION['survey_'.$surveyid]['holdname'] = $param['loadname']; //Session variable used to load answers every page.
$_SESSION['survey_'.$surveyid]['holdpass'] = $param['loadpass']; //Session variable used to load answers every page.

if ($errormsg == "") loadanswers();
$move = "movenext";
if ($errormsg == "") {
if (loadanswers()){
$move = "movenext";
} else {
$errormsg .= $clang->gT("There is no matching saved survey");
}
}

if ($errormsg)
{
Expand Down
1 change: 0 additions & 1 deletion application/helpers/frontend_helper.php
Expand Up @@ -52,7 +52,6 @@ function loadanswers()
$aRow = Yii::app()->db->createCommand($query)->queryRow();
if (!$aRow)
{
safeDie($clang->gT("There is no matching saved survey")."<br />\n");
return false;
}
else
Expand Down

0 comments on commit a5e11ee

Please sign in to comment.