Changeset 112995 in spip-zone


Ignore:
Timestamp:
Dec 20, 2018, 3:08:32 PM (4 weeks ago)
Author:
cedric@…
Message:

fix urls admin sur les destinataires, filtre de statut sur la recherche subscribers

Location:
_plugins_/mailsubscribers/trunk
Files:
3 edited

Legend:

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

    r112991 r112995  
    2828                }
    2929        }
    30         $boucle->where[] = "(($_id_mailsubscribinglist or $_statut=='prop')?'$_mailsubscription_statut':'$_mailsubscriber_statut').'!='.sql_quote('poubelle')";
     30        $where_not_poubelle = "(($_id_mailsubscribinglist or $_statut=='prop')?'$_mailsubscription_statut':'$_mailsubscriber_statut').'!='.sql_quote('poubelle')";
     31        $boucle->where[] = "((!$_statut or !in_array($_statut,array('all','poubelle')))?$where_not_poubelle:'1=1')";
    3132        $where = "(($_id_mailsubscribinglist or $_statut=='prop')?'$_mailsubscription_statut':'$_mailsubscriber_statut').'='.sql_quote($_statut)";
    3233        if ($crit->cond){
    33                 $where = "($_statut?$where:'1=1')";
     34                $where = "(($_statut and $_statut!=='all')?$where:'1=1')";
    3435        }
    3536        $boucle->where[] = $where;
  • _plugins_/mailsubscribers/trunk/newsletter/subscriber.php

    r112481 r112995  
    4141                $infos = mailsubscribers_informe_subscriber($infos);
    4242                $infos['url_admin'] = generer_url_entite($id_mailsubscriber, 'mailsubscriber');
     43                if ($infos['email'] !== $email) {
     44                        $infos['url_admin'] = parametre_url($infos['url_admin'], 'email', $email);
     45                }
    4346
    4447                // si on est dans le contexte d'une liste unique connue, modifier l'url_unsubscribe
  • _plugins_/mailsubscribers/trunk/prive/squelettes/inclure/mailsubscribers-filtre.html

    r112991 r112995  
    2828
    2929        [(#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:>}>
     30        <INCLURE{fond=prive/objets/liste/mailsubscribers,email=#GET{emails},statut=all,nb=20,env,sinon=<:mailsubscriber:info_aucun_mailsubscriber:>}>
    3131
    3232        <h3>Envois à #ENV{recherche}</h3>
Note: See TracChangeset for help on using the changeset viewer.