Changeset 67848 in spip-zone


Ignore:
Timestamp:
Nov 21, 2012, 5:34:07 PM (7 years ago)
Author:
cedric@…
Message:

FORMULAIRE_NEWSLETTER_SUSCRIBE
et
FORMULAIRE_NEWSLETTER_UNSUSCRIBE

+ debug sur l'API

Location:
_plugins_/mailsuscribers
Files:
5 added
3 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/mailsuscribers/newsletter/suscribe.php

    r67843 r67848  
    1111include_spip("action/editer_objet");
    1212include_spip('inc/mailsuscribers');
    13 include_spip('inc/lire_config');
     13include_spip('inc/config');
    1414include_spip('inc/autoriser');
    1515
     
    6060                if (!isset($set['listes']))
    6161                        $set['listes'] = mailsuscribers_normaliser_nom_liste();
     62                // statut et date par defaut
     63                $set['statut'] = 'prepa';
     64                $set['date'] = date('Y-m-d H:i:s');
    6265
    6366                // Envoyer aux plugins
     
    120123                }
    121124        }
    122 
    123125        if (count($set)){
    124126                autoriser_exception("modifier","mailsuscriber",$row['id_mailsuscriber']);
     127                autoriser_exception("instituer","mailsuscriber",$row['id_mailsuscriber']);
    125128                objet_modifier("mailsuscriber",$row['id_mailsuscriber'],$set);
    126129                autoriser_exception("modifier","mailsuscriber",$row['id_mailsuscriber'],false);
     130                autoriser_exception("instituer","mailsuscriber",$row['id_mailsuscriber'],false);
    127131        }
    128132
  • _plugins_/mailsuscribers/newsletter/unsuscribe.php

    r67843 r67848  
    1111include_spip("action/editer_objet");
    1212include_spip('inc/mailsuscribers');
    13 include_spip('inc/lire_config');
     13include_spip('inc/config');
    1414include_spip('inc/autoriser');
    1515
     
    6767                if (count($set)){
    6868                        autoriser_exception("modifier","mailsuscriber",$row['id_mailsuscriber']);
     69                        autoriser_exception("instituer","mailsuscriber",$row['id_mailsuscriber']);
    6970                        objet_modifier("mailsuscriber",$row['id_mailsuscriber'],$set);
    7071                        autoriser_exception("modifier","mailsuscriber",$row['id_mailsuscriber'],false);
     72                        autoriser_exception("instituer","mailsuscriber",$row['id_mailsuscriber'],false);
    7173                }
    7274        }
  • _plugins_/mailsuscribers/paquet.xml

    r67843 r67848  
    22        prefix="mailsuscribers"
    33        categorie="communication"
    4         version="0.2.0"
     4        version="0.3.0"
    55        etat="dev"
    66        compatibilite="[3.0.0;3.0.*]"
Note: See TracChangeset for help on using the changeset viewer.