Skip to content

Commit

Permalink
Catch duplicated on subscribers import even when sent as part of the …
Browse files Browse the repository at this point in the history
…same list. Fixes #114
  • Loading branch information
soonick committed Jan 22, 2013
1 parent bf28988 commit 41d4a26
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions subscribers_import.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,18 +124,17 @@
}
else
{
// Saves all parsed E-mails in an array
$a = array();
while (($data = fgetcsv($fp, 2048, ',', '"')) !== FALSE)
{
foreach ($data as $email)
{
if (Pommo_Helper::isEmail($email))
{
array_push($a, $email);
}
}
}
// Saves all parsed E-mails in an array
$a = array();
while (($data = fgetcsv($fp, 2048, ',', '"')) !== false) {
foreach ($data as $email) {
if (Pommo_Helper::isEmail($email)) {
$email = strtolower($email);
$a[$email] = $email;
}
}
}


// Removes from the array E-mails that are already on the database
$includeUnsubscribed = isset($_REQUEST['excludeUnsubscribed']) ?
Expand Down

0 comments on commit 41d4a26

Please sign in to comment.