Skip to content

Commit

Permalink
Fixed issue #6819: Unable to export tokens to CSV file
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Nov 1, 2012
1 parent 88e4d72 commit 4aac08c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion application/controllers/admin/tokens.php
Expand Up @@ -1523,7 +1523,7 @@ function exportdialog($iSurveyId)
}
else
{
$aData['resultr'] = Tokens_dynamic::model($iSurveyId)->find(array('select' => 'language', 'group' => 'language'));
$aData['resultr'] = Tokens_dynamic::model($iSurveyId)->findAll(array('select' => 'language', 'group' => 'language'));
$aData['thissurvey'] = getSurveyInfo($iSurveyId);
$aData['surveyid'] = $iSurveyId;

Expand Down
3 changes: 1 addition & 2 deletions application/helpers/common_helper.php
Expand Up @@ -5828,8 +5828,7 @@ function getXMLWriter() {
function usedTokens($token, $surveyid)
{
$utresult = true;
Tokens_dynamic::sid($surveyid);
$query=Tokens_dynamic::model()->findAllByAttributes(array("token"=>$token));
$query=Tokens_dynamic::model($surveyid)->findAllByAttributes(array("token"=>$token));
if (count($query) > 0) {
$row = $query[0];
if ($row->usesleft > 0) $utresult = false;
Expand Down
2 changes: 1 addition & 1 deletion application/views/admin/token/exportdialog.php
Expand Up @@ -27,7 +27,7 @@
if($resultr){
foreach ($resultr as $lrow)
{
echo "<option value='{$lrow['language']}'>" . getLanguageNameFromCode($lrow['language']) . "</option>";
echo "<option value='{$lrow->language}'>" . getLanguageNameFromCode($lrow->language,false) . "</option>";
}
}
?>
Expand Down

0 comments on commit 4aac08c

Please sign in to comment.