Skip to content

Commit

Permalink
Fixed issue #16474: Remote control import_group broken
Browse files Browse the repository at this point in the history
Merge pull request #1698 from gabrieljenik/bug/16474--Remote-control-import_group-broken
  • Loading branch information
olleharstedt committed Feb 19, 2021
2 parents 7a7267e + 775a27b commit 05c5545
Show file tree
Hide file tree
Showing 4 changed files with 888 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/helpers/remotecontrol/remotecontrol_handle.php
Expand Up @@ -1105,7 +1105,7 @@ public function import_group($sSessionKey, $iSurveyID, $sImportData, $sImportDat
return array('status' => 'Invalid extension');
}
libxml_use_internal_errors(true);
Yii::app()->loadHelper('admin/import');
Yii::app()->loadHelper('admin.import');
// First save the data to a temporary file
$sFullFilePath = Yii::app()->getConfig('tempdir') . DIRECTORY_SEPARATOR . randomChars(40) . '.' . $sImportDataType;
file_put_contents($sFullFilePath, base64_decode(chunk_split($sImportData)));
Expand All @@ -1123,7 +1123,7 @@ public function import_group($sSessionKey, $iSurveyID, $sImportData, $sImportDat
}
return array('status' => 'Error: Invalid LimeSurvey group structure XML ');
}
$aImportResults = XMLImportGroup($sFullFilePath, $iSurveyID);
$aImportResults = XMLImportGroup($sFullFilePath, $iSurveyID, true);
} else {
return array('status' => 'Invalid extension');
}
Expand Down

0 comments on commit 05c5545

Please sign in to comment.