Skip to content
Permalink
Browse files

Fixed issue #15832: Participant settings not imported correctly when …

…importing a CSV file (emailstatus issue)
  • Loading branch information
lime-marc committed Feb 13, 2020
1 parent 03840d3 commit bdea8b997694d443d95c7e26a441d1b1f59e2967
Showing with 4 additions and 6 deletions.
  1. +3 −5 application/controllers/admin/tokens.php
  2. +1 −1 application/models/LSActiveRecord.php
@@ -411,11 +411,10 @@ public function editMultiple()

// Email
if (trim(Yii::app()->request->getPost('email', 'lskeep')) != 'lskeep') {
$isValid = preg_match('/^([a-zA-Z0-9.!#$%&’*+\/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+))(,([a-zA-Z0-9.!#$%&’*+\/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)))*$/', Yii::app()->request->getPost('email'));
if ($isValid) {
$aData['email'] = Yii::app()->request->getPost('email');
if (trim(Yii::app()->request->getPost('email')) == '') {
$aData['email'] = null;
} else {
$aData['email'] = 'lskeep';
$aData['email'] = trim(Yii::app()->request->getPost('email'));
}
}

@@ -1950,7 +1949,6 @@ public function import($iSurveyId)
$aData['title_bar']['title'] = $survey->currentLanguageSettings->surveyls_title." (".gT("ID").":".$iSurveyId.")";
$aData['sidemenu']["token_menu"] = true;
$aData['token_bar']['closebutton']['url'] = 'admin/tokens/sa/index/surveyid/'.$iSurveyId;
$aData['topBar']['showSaveButton'] = true;
$aData['topBar']['closeButtonUrl'] = Yii::app()->createUrl('admin/tokens/sa/index/surveyid/'.$iSurveyId);
App()->getClientScript()->registerScriptFile(App()->getConfig('adminscripts').'tokensimport.js');
$aEncodings = aEncodingsArray();
@@ -387,7 +387,7 @@ public function encrypt()
/**
* Encrypt values before saving to the database
*/
public function encryptSave($runValidation=false)
public function encryptSave($runValidation=true)
{
// run validation on attribute values before encryption take place, it is impossible to validate encrypted values
if ($runValidation){

0 comments on commit bdea8b9

Please sign in to comment.
You can’t perform that action at this time.