Skip to content

Commit

Permalink
Fixed issue #18140: cannot import vv file (with debug set) (#2453)
Browse files Browse the repository at this point in the history
Dev: remove uneeded unlink and add comment in function
  • Loading branch information
Shnoulle committed Jun 6, 2022
1 parent c1fe0dc commit 4bea7d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion application/controllers/admin/dataentry.php
Expand Up @@ -144,7 +144,6 @@ private function _handleFileUpload($iSurveyId, $aData)
$aOptions['sCharset'] = Yii::app()->request->getPost('vvcharset');
$aOptions['sSeparator'] = "\t";
$aResult = CSVImportResponses($filePath, $iSurveyId, $aOptions);
unlink($filePath); //delete the uploaded file
$aData['class'] = "";
$aData['title'] = gT("Import a VV response data file");
$aData['aResult']['success'][] = gT("File upload succeeded.");
Expand Down
2 changes: 2 additions & 0 deletions application/helpers/admin/import_helper.php
Expand Up @@ -1878,6 +1878,7 @@ function XMLImportResponses($sFullFilePath, $iSurveyID, $aFieldReMap = array())

/**
* This function imports a CSV file into the response table
* csv file is deleted during process
*
* @param string $sFullFilePath
* @param integer $iSurveyId
Expand Down Expand Up @@ -2780,6 +2781,7 @@ function createXMLfromData($aData = array()){

/**
* Read a csv file and resturn a tmp ressources to same file in utf8
* csv file is deleted during process
* @param string $fullfilepath
* @param string $encoding from
* @return resource
Expand Down

0 comments on commit 4bea7d6

Please sign in to comment.