Changeset 111633 in spip-zone


Ignore:
Timestamp:
Sep 20, 2018, 8:43:30 AM (7 months ago)
Author:
cedric@…
Message:

complement de r111632 : ne pas oublie les emails obfusques

Location:
_plugins_/mailsubscribers/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/mailsubscribers/trunk/inc/mailsubscribers.php

    r111632 r111633  
    669669
    670670        // on enleve de la liste ceux qui ont deja ete abonnes dans le passe mais se sont desinscrit car on ne les reabonnera pas
     671        $obfusques = array_keys($abonnes_emails);
     672        $obfusques = array_combine(array_map('mailsubscribers_obfusquer_email', $obfusques), $obfusques);
    671673        $unsubs = sql_allfetsel('S.email',
    672674                'spip_mailsubscribers as S JOIN spip_mailsubscriptions as L ON S.id_mailsubscriber=L.id_mailsubscriber',
    673                 'L.id_mailsubscribinglist=' . intval($id_mailsubscribinglist) . ' AND L.id_segment=0 AND L.statut=' . sql_quote('refuse') . ' AND ' . sql_in('S.email', array_keys($abonnes_emails)));
     675                'L.id_mailsubscribinglist=' . intval($id_mailsubscribinglist) . ' AND L.id_segment=0 AND L.statut=' . sql_quote('refuse') . ' AND ' . sql_in('S.email', array_merge(array_keys($obfusques), array_values($obfusques))));
    674676        spip_log("mailsubscribers_synchronise_liste $liste: " . count($unsubs) . " ne veulent pas etre reabonnes a la liste", "mailsubscribers" . _LOG_DEBUG);
    675677        foreach ($unsubs as $unsub) {
    676678                if (isset($abonnes_emails[$unsub['email']])) {
    677679                        unset($abonnes_emails[$unsub['email']]);
     680                }
     681                elseif (isset($abonnes_emails[$obfusques[$unsub['email']]])) {
     682                        unset($abonnes_emails[$obfusques[$unsub['email']]]);
    678683                }
    679684        }
  • _plugins_/mailsubscribers/trunk/paquet.xml

    r111632 r111633  
    22        prefix="mailsubscribers"
    33        categorie="communication"
    4         version="2.9.1"
     4        version="2.9.2"
    55        etat="stable"
    66        compatibilite="[3.0.0;3.2.*]"
Note: See TracChangeset for help on using the changeset viewer.