Skip to content

Commit

Permalink
Fixed issue : Switch option when import VV not used
Browse files Browse the repository at this point in the history
Dev: Switch return 1 or 0 as value
  • Loading branch information
Shnoulle committed Mar 27, 2017
1 parent 7a6ee6b commit 6312d81
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions application/controllers/admin/dataentry.php
Expand Up @@ -143,14 +143,14 @@ private function _handleFileUpload($iSurveyId, $aData)
Yii::app()->loadHelper('admin/import');
// Fill option
$aOptions=array();
$aOptions['bDeleteFistLine']=(Yii::app()->request->getPost('dontdeletefirstline') == "dontdeletefirstline")?false:true;// Force, maybe function change ;)
if(Yii::app()->request->getPost('noid')==="noid"){
$aOptions['bDeleteFistLine']=! (bool) Yii::app()->request->getPost('dontdeletefirstline');
if(Yii::app()->request->getPost('noid')){
$aOptions['sExistingId']='ignore';
}else{
$aOptions['sExistingId']=Yii::app()->request->getPost('insertmethod');
}
$aOptions['bNotFinalized']=(Yii::app()->request->getPost('notfinalized') == "notfinalized");
$aOptions['bForceImport']=(Yii::app()->request->getPost('forceimport') == "forceimport");
$aOptions['bNotFinalized']=(bool) Yii::app()->request->getPost('notfinalized');
$aOptions['bForceImport']=(bool) Yii::app()->request->getPost('forceimport');
$aOptions['sCharset']=Yii::app()->request->getPost('vvcharset');
$aOptions['sSeparator']="\t";
$aResult=CSVImportResponses($filePath,$iSurveyId,$aOptions);
Expand Down

0 comments on commit 6312d81

Please sign in to comment.