Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* XnetGrp:
- Add footer linking to the group for group-related emails -XEL
* XnetGrp:
- Add footer linking to the group for group-related emails -XEL
+ - Allow disabling the "send mails" on a per-group basis -XEL
================================================================================
VERSION 1.1.7 18 02 2013
================================================================================
VERSION 1.1.7 18 02 2013
$sub['modifier l\'accueil'] = "$dim/edit";
$sub['gérer les annonces'] = "$dim/admin/announces";
if ($globals->asso('mail_domain')) {
$sub['modifier l\'accueil'] = "$dim/edit";
$sub['gérer les annonces'] = "$dim/admin/announces";
if ($globals->asso('mail_domain')) {
- $sub['envoyer un mail'] = "$dim/mail";
+ if (!$globals->asso('disable_mails')) {
+ $sub['envoyer un mail'] = "$dim/mail";
+ }
$sub['créer une liste'] = "$dim/lists/create";
$sub['créer un alias'] = "$dim/alias/create";
}
$sub['créer une liste'] = "$dim/lists/create";
$sub['créer un alias'] = "$dim/alias/create";
}
$page->assign('pub', Post::v('pub'));
$page->assign('notif_unsub', Post::i('notif_unsub'));
$page->assign('descr', Post::t('descr'));
$page->assign('pub', Post::v('pub'));
$page->assign('notif_unsub', Post::i('notif_unsub'));
$page->assign('descr', Post::t('descr'));
+ $page->assign('disable_mails', Post::b('disable_mails'));
$page->assign('error', $error);
return;
}
$page->assign('error', $error);
return;
}
descr={?}, site={?}, mail={?}, resp={?},
forum={?}, mail_domain={?}, ax={?}, axDate = {?}, pub={?},
sub_url={?}, inscriptible={?}, unsub_url={?},
descr={?}, site={?}, mail={?}, resp={?},
forum={?}, mail_domain={?}, ax={?}, axDate = {?}, pub={?},
sub_url={?}, inscriptible={?}, unsub_url={?},
- flags = {?}, welcome_msg = {?}
+ flags = {?}, welcome_msg = {?}, disable_mails = {?}
WHERE id={?}",
Post::v('nom'), Post::v('diminutif'),
Post::v('cat'), (Post::i('dom') == 0) ? null : Post::i('dom'),
WHERE id={?}",
Post::v('nom'), Post::v('diminutif'),
Post::v('cat'), (Post::i('dom') == 0) ? null : Post::i('dom'),
Post::has('ax'), $axDate, Post::v('pub'),
Post::v('sub_url'), Post::v('inscriptible'),
Post::v('unsub_url'), $flags, Post::t('welcome_msg'),
Post::has('ax'), $axDate, Post::v('pub'),
Post::v('sub_url'), Post::v('inscriptible'),
Post::v('unsub_url'), $flags, Post::t('welcome_msg'),
+ Post::b('disable_mails'),
$globals->asso('id'));
if (Post::v('mail_domain')) {
XDB::execute('INSERT IGNORE INTO email_virtual_domains (name)
$globals->asso('id'));
if (Post::v('mail_domain')) {
XDB::execute('INSERT IGNORE INTO email_virtual_domains (name)
$page->assign('pub', $globals->asso('pub'));
$page->assign('notif_unsub', $globals->asso('notif_unsub'));
$page->assign('notify_all', $globals->asso('notify_all'));
$page->assign('pub', $globals->asso('pub'));
$page->assign('notif_unsub', $globals->asso('notif_unsub'));
$page->assign('notify_all', $globals->asso('notify_all'));
+ $page->assign('disable_mails', $globals->asso('disable_mails'));
}
function handler_mail($page)
{
global $globals;
}
function handler_mail($page)
{
global $globals;
+ if ($globals->asso('disable_mails')) {
+ return PL_FORBIDDEN;
+ }
$page->changeTpl('xnetgrp/mail.tpl');
$mmlist = new MMList(S::user(), $globals->asso('mail_domain'));
$page->changeTpl('xnetgrp/mail.tpl');
$mmlist = new MMList(S::user(), $globals->asso('mail_domain'));
<small>(ex: 01/01/1970)</small>
</td>
</tr>
<small>(ex: 01/01/1970)</small>
</td>
</tr>
+ <tr>
+ <td class="titre center" colspan="2">
+ <label><input type="checkbox" value="1" name="disable_mails" {if $disable_mails}checked="checked"{/if} />
+ désactiver l'envoi de mails</label>
+ </td>
+ </tr>
--- /dev/null
+ALTER TABLE groups ADD COLUMN disable_mails int(1) NOT NULL DEFAULT 0;
+
+-- vim:set syntax=mysql: