Changeset 112991 in spip-zone


Ignore:
Timestamp:
Dec 20, 2018, 2:47:47 PM (4 weeks ago)
Author:
cedric@…
Message:

quand on recherche un email dans les subscribers, retrouver aussi les subscribers dont l'email hashe correspond a cet email, et afficher les envois correspondants
le lien vers la page du subscriber contient alors les emails pas hashe/hashe et ils sont utilises pour afficher la aussi les envois correspondants, meme si le subscriber est obfusque

Location:
_plugins_/mailsubscribers/trunk
Files:
6 edited

Legend:

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

    r112771 r112991  
    132132}
    133133
    134 function mailsubscribers_obfusquer_email($email) {
    135     if (defined('_MAILSUBSCRIBERS_GARDER_EMAILENCLAIR') )
    136         return $email;
    137     else
    138             return md5($email) . "@example.org";
     134function mailsubscribers_obfusquer_email($email, $force = false) {
     135    if (!$force and defined('_MAILSUBSCRIBERS_GARDER_EMAILENCLAIR') ) {
     136            return $email;
     137    }
     138
     139    return md5($email) . "@example.org";
    139140}
    140141
  • _plugins_/mailsubscribers/trunk/mailsubscribers_fonctions.php

    r112775 r112991  
    6060        return mailsubscribers_compte_inscrits($liste, $statut, $id_segment);
    6161}
     62
     63
     64function filtre_email_variante_obfusquee_dist($email) {
     65        if (!function_exists('mailsubscribers_test_email_obfusque')) {
     66                include_spip('inc/mailsubscribers');
     67        }
     68        if (mailsubscribers_test_email_obfusque($email)) {
     69                return $email;
     70        }
     71
     72        // ne pas passer par
     73        return mailsubscribers_obfusquer_email($email, true);
     74}
     75
    6276
    6377/**
  • _plugins_/mailsubscribers/trunk/paquet.xml

    r112980 r112991  
    22        prefix="mailsubscribers"
    33        categorie="communication"
    4         version="2.10.1"
     4        version="2.11.0"
    55        etat="stable"
    66        compatibilite="[3.0.0;3.2.*]"
  • _plugins_/mailsubscribers/trunk/prive/objets/contenu/mailsubscriber.html

    r111842 r112991  
    5656</div>]
    5757
     58
     59<h3>Envois</h3>
     60
     61<INCLURE{fond=prive/objets/liste/mailshots_destinataires,email=#ENV{email}|sinon{#EMAIL},nb=100,par=date,env,sinon=<:mailshot:info_aucun_envoi:>}>
     62
    5863</BOUCLE_mailsubscriber>
  • _plugins_/mailsubscribers/trunk/prive/objets/liste/mailsubscribers.html

    r102875 r112991  
    1919        </thead>
    2020        <tbody>
    21         <BOUCLE_mailsubscribers(MAILSUBSCRIBERS){id_mailsubscriber?}{id_mot?}{id_auteur?}{where?}{id_mailsubscribinglist?}{id_segment?}{filtre_statut_subscription?}{recherche?}{tri #ENV{par,num email},#GET{defaut_tri}}{par email}{pagination #ENV{nb,10}}>
     21        <BOUCLE_mailsubscribers(MAILSUBSCRIBERS){id_mailsubscriber?}{id_mot?}{id_auteur?}{where?}{email?}{id_mailsubscribinglist?}{id_segment?}{filtre_statut_subscription?}{recherche?}{tri #ENV{par,num email},#GET{defaut_tri}}{par email}{pagination #ENV{nb,10}}>
    2222                <tr class='[(#COMPTEUR_BOUCLE|alterner{row_odd,row_even})]'>
    2323                        <td class='picto'>[(#CHEMIN_IMAGE{mailsubscriber-16.png}|balise_img)]</td>
    2424                        <td class='statut'>[(#ENV{id_mailsubscribinglist}|?{#STATUT_SUBSCRIPTION|puce_statut{mailsubscriber},#STATUT|puce_statut{mailsubscriber,#ID_MAILSUBSCRIBER}})]</td>
    25                         <td class='email principale'>[(#LOGO_MAILSUBSCRIBER|image_reduire{20,26})]<a href="[(#ID_MAILSUBSCRIBER|generer_url_entite{mailsubscriber})]" title="<:info_numero_abbreviation|attribut_html:> #ID_MAILSUBSCRIBER">[(#RANG). ]#EMAIL</a></td>
     25                        <td class='email principale'>[(#LOGO_MAILSUBSCRIBER|image_reduire{20,26})]<a href="[(#ID_MAILSUBSCRIBER|generer_url_entite{mailsubscriber}|parametre_url{email,#ENV{email}})]" title="<:info_numero_abbreviation|attribut_html:> #ID_MAILSUBSCRIBER">[(#RANG). ]#EMAIL</a></td>
    2626                        <td class='date secondaire'>[(#DATE|affdate_jourcourt)]</td>
    2727                        <td class='id'>[(#AUTORISER{modifier,mailsubscriber,#ID_MAILSUBSCRIBER}|?{
  • _plugins_/mailsubscribers/trunk/prive/squelettes/inclure/mailsubscribers-filtre.html

    r107655 r112991  
    2121<div class="nettoyeur"></div>
    2222
    23 <INCLURE{fond=prive/objets/liste/mailsubscribers, par=num email, statut=#GET{statut}, nb=20, env, ajax, sinon=<:mailsubscriber:info_aucun_mailsubscriber:>}>
     23<INCLURE{fond=prive/objets/liste/mailsubscribers,par=num email,statut=#GET{statut},nb=20,env,ajax,sinon=<:mailsubscriber:info_aucun_mailsubscriber:>}>
     24
     25[(#ENV{recherche}|oui)
     26
     27        <h3>Email #ENV{recherche}</h3>
     28
     29        [(#SET{emails,[(#LISTE{[(#ENV{recherche}|trim)],[(#ENV{recherche}|trim|email_variante_obfusquee)]})]})]
     30        <INCLURE{fond=prive/objets/liste/mailsubscribers,email=#GET{emails},nb=20,env,sinon=<:mailsubscriber:info_aucun_mailsubscriber:>}>
     31
     32        <h3>Envois à #ENV{recherche}</h3>
     33
     34        <INCLURE{fond=prive/objets/liste/mailshots_destinataires,email=#GET{emails},nb=100,par=date,env,sinon=<:mailshot:info_aucun_envoi:>}>
     35
     36]
    2437
    2538[(#AUTORISER{creer,mailsubscriber})
Note: See TracChangeset for help on using the changeset viewer.