Skip to content

Commit

Permalink
Fixed issue #13845: Can't export and then import tab-separated text s… (
Browse files Browse the repository at this point in the history
#1092)

* Fixed issue #13845: Can't export and then import tab-separated text survey file
Dev: real fix, number only in subquestion is allowed

* Dev: usage of setAttributes with safeonly to false
  • Loading branch information
Shnoulle authored and olleharstedt committed Jul 18, 2018
1 parent fe8fb89 commit 5072238
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/helpers/admin/import_helper.php
Expand Up @@ -2390,8 +2390,8 @@ function TSVImportSurvey($sFullFilePath)
}
}
} else {
$insertdata = array();
$scale_id = (isset($row['type/scale']) ? $row['type/scale'] : 0);
$insertdata = array();
$insertdata['sid'] = $iNewSID;
$insertdata['gid'] = $gid;
$insertdata['parent_qid'] = $qid;
Expand All @@ -2416,7 +2416,7 @@ function TSVImportSurvey($sFullFilePath)
}
// Insert sub question and keep the sqid for multi language survey
$question = new Question();
$question->attributes = $insertdata;
$question->setAttributes($insertdata,false); //$question->attributes = $insertdata; : this broke call of $this when test rules when save : PLEASE : don't use
if (!$question->save()) {
$results['error'][] = gT("Error")." : ".gT("Could not insert subquestion").". ".gT("Text file row number ").$rownumber." (".$sqname.")";
break;
Expand Down

0 comments on commit 5072238

Please sign in to comment.