Skip to content

Commit

Permalink
Fixed issue #6113 Import participants from CSV does not work. Adjuste…
Browse files Browse the repository at this point in the history
…d system settings to cope with mac file endings

Dev note: (check the diff and have a laugh at why this wasn't working before!)
  • Loading branch information
jcleeland committed Jul 30, 2012
1 parent 5648dd3 commit 39b5089
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions application/controllers/admin/participantsaction.php
Expand Up @@ -1437,21 +1437,24 @@ function uploadCSV()
$filterblankemails = Yii::app()->request->getPost('filterbea');
$overwrite = Yii::app()->request->getPost('overwrite');
$errorinupload = "";
$tokenlistarray = file($sFilePath);
$recordcount = 0;
$mandatory = 0;
$mincriteria = 0;
$imported = 0;
$dupcount = 0;
$overwritten = 0;
$dupreason="nameemail";
$dupreason="nameemail"; //Default duplicate comparison method
$duplicatelist = array();
$invalidemaillist = array();
$invalidformatlist = array();
$invalidattribute = array();
$invalidparticipantid = array();
// This allows to read file with MAC line endings too

/* Adjust system settings to read file with MAC line endings */
@ini_set('auto_detect_line_endings', true);
/* Open the uploaded file into an array */
$tokenlistarray = file($sFilePath);

// open it and trim the endings
$separator = Yii::app()->request->getPost('seperatorused');
$uploadcharset = Yii::app()->request->getPost('characterset');
Expand Down

0 comments on commit 39b5089

Please sign in to comment.