Permalink
Browse files

Catch duplicated on subscribers import even when sent as part of the …

…same list. Fixes #114
  • Loading branch information...
1 parent bf28988 commit 41d4a26dd79562fcfc9866f12a1709dab90ccdd1 @soonick committed Jan 22, 2013
Showing with 11 additions and 12 deletions.
  1. +11 −12 subscribers_import.php
View
@@ -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']) ?

0 comments on commit 41d4a26

Please sign in to comment.