<?php
/***************************************************************************
- * Copyright (C) 2003-2011 Polytechnique.org *
+ * Copyright (C) 2003-2014 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/** Prepare a MailingList from its mailbox
*/
- protected function prepare_list($mbox, $user=null)
+ protected function prepare_list($mbox)
{
// Required: modules/xnetlists.php uses it too.
Platal::load('lists', 'lists.inc.php');
- if (is_null($user)) {
- $user = S::user();
- }
- return new MailingList($mbox, $this->get_lists_domain(), $user);
+ return new MailingList($mbox, $this->get_lists_domain());
}
/** Ensure the current user is an administrator of the group.
$promo = Post::i('promo_add');
if ($promo >= 1900 and $promo < 2100) {
- $mlist = MailingList::promo($promo, S::user());
+ $mlist = MailingList::promo($promo);
$mlist->subscribe();
} else {
$page->trigError("promo incorrecte, il faut une promo sur 4 chiffres.");
if (Env::has('sadd')) {
// Ensure the moderated request is still active
- $sub = $mlist->getPendingSub(Env::v('sadd'));
+ $sub = $mlist->getPendingSubscription(Env::v('sadd'));
$mlist->handleRequest(MailingList::REQ_SUBSCRIBE, Env::v('sadd'));
$info = "validée";
}
if (Post::has('sdel')) {
// Ensure the moderated request is still active
- $sub = $mlist->getPendingSub(Env::v('sdel'));
+ $sub = $mlist->getPendingSubscription(Env::v('sdel'));
$mlist->handleRequest(MailingList::REQ_REJECT, Post::v('sdel'), Post::v('reason'));
$info = "refusée";
if (strpos(Env::v('del_owner'), '@') === false) {
if ($del_owner = User::getSilent(Env::t('del_owner'))) {
- $mlist->unsubscribeBulk(array($del_owner->forlifeEmail()));
+ $mlist->removeOwner($del_owner->forlifeEmail());
}
} else {
$mlist->removeOwner(Env::v('del_owner'));
}
}
-// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker fenc=utf-8:
?>