Changeset 108103 in spip-zone


Ignore:
Timestamp:
Dec 18, 2017, 11:43:07 AM (18 months ago)
Author:
cedric@…
Message:

Dans la liste des subscribers, on veut pouvoir voir tous ceux qui ont une inscription en attente, quel que soit leur statut general (ils peuvent etre inscrit sur une autre liste ou pas du tout)

Location:
_plugins_/mailsubscribers/trunk
Files:
3 edited

Legend:

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

    r106951 r108103  
    206206                        $count[''][$row['statut']][0] += $row['n'];
    207207                }
     208                // sauf pour statut en attente : on compte tous les subscribers qui ont une inscription en attente
     209                $count['']['prop'][0] = sql_getfetsel('count(DISTINCT id_mailsubscriber)','spip_mailsubscriptions', 'statut='.sql_quote('prop').' AND id_segment=0');
    208210
    209211        }
  • _plugins_/mailsubscribers/trunk/mailsubscribers_fonctions.php

    r106951 r108103  
    2626                }
    2727        }
    28         $boucle->where[] = "($_id_mailsubscribinglist?'$_mailsubscription_statut':'$_mailsubscriber_statut').'!='.sql_quote('poubelle')";
    29         $where = "($_id_mailsubscribinglist?'$_mailsubscription_statut':'$_mailsubscriber_statut').'='.sql_quote($_statut)";
     28        $boucle->where[] = "(($_id_mailsubscribinglist or $_statut=='prop')?'$_mailsubscription_statut':'$_mailsubscriber_statut').'!='.sql_quote('poubelle')";
     29        $where = "(($_id_mailsubscribinglist or $_statut=='prop')?'$_mailsubscription_statut':'$_mailsubscriber_statut').'='.sql_quote($_statut)";
    3030        if ($crit->cond){
    3131                $where = "($_statut?$where:'1=1')";
     
    3333        $boucle->where[] = $where;
    3434        $boucles[$idb]->modificateur['criteres']['statut'] = true;
    35         $boucle->select[] = '".'."($_id_mailsubscribinglist?'$_mailsubscription_statut':'$_mailsubscriber_statut')".'." as statut_subscription';
     35        $boucle->select[] = '".'."(($_id_mailsubscribinglist or $_statut=='prop')?'$_mailsubscription_statut':'$_mailsubscriber_statut')".'." as statut_subscription';
    3636}
    3737
  • _plugins_/mailsubscribers/trunk/paquet.xml

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