Skip to content

Commit

Permalink
Fixed issue #09175: Feature "Allow multiple responses or update respo…
Browse files Browse the repository at this point in the history
…nses with one token" failed

Dev : Use existing $oTokenEntry if exist
  • Loading branch information
Shnoulle committed Aug 18, 2014
1 parent 57efbc8 commit bc37818
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions application/helpers/frontend_helper.php
Expand Up @@ -1179,27 +1179,13 @@ function buildsurveysession($surveyid,$preview=false)
$_SESSION['survey_'.$surveyid]['fieldnamesInfo'] = Array();


//RL: multilingual support
if (isset($_GET['token']) && tableExists('{{tokens_'.$surveyid.'}}'))
{

//get language from token (if one exists)
$token = Token::model($surveyid)->findByAttributes(array(
'token' => $clienttoken,
'completed' => array('N', '')
));
if (!isset($token))
{
safeDie ("Couldn't get token<br />");
}
$tklanguage = $token->language;
}
if (returnGlobal('lang',true))
{
$language_to_set=returnGlobal('lang',true);
} elseif (isset($tklanguage))
}
elseif (isset($oTokenEntry) && $oTokenEntry)
{
$language_to_set=$tklanguage;
$language_to_set=$oTokenEntry->language;
}
else
{
Expand Down

0 comments on commit bc37818

Please sign in to comment.