Skip to content

Commit

Permalink
Fixed issue #08462 : Unable to import contacts into Central Participa…
Browse files Browse the repository at this point in the history
…nt Database

Dev: refix empty firstname and lastname
Dev: allow empty first field
  • Loading branch information
Shnoulle committed Jun 11, 2014
1 parent fd4839a commit 1723238
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions application/controllers/admin/participantsaction.php
Expand Up @@ -1264,8 +1264,6 @@ function uploadCSV()
} else {
// After looking at the first line, we now import the actual values
$line = convertCSVRowToArray($buffer, $separator, '"');
// Discard empty lines
if (empty($line[0])) continue;
// Discard lines where the number of fields do not match
if (count($firstline) != count($line))
{
Expand All @@ -1274,7 +1272,6 @@ function uploadCSV()
continue;
}
$writearray = array_combine($firstline, $line);

//kick out ignored columns
foreach ($ignoredcolumns as $column)
{
Expand Down Expand Up @@ -1371,7 +1368,7 @@ function uploadCSV()
unset($writearray['validuntil']);
}
$dontimport=false;
if (($filterblankemails == "accept" && $writearray['email'] == "") || $writearray['firstname'] == "" || $writearray['lastname'] == "") {
if (($filterblankemails == "accept" && $writearray['email'] == "")) {
//The mandatory fields of email, firstname and lastname
//must be filled, but one or more are empty
$mandatory++;
Expand Down

0 comments on commit 1723238

Please sign in to comment.