Commit 35095c33 authored by Skia's avatar Skia
Browse files

Change mailing list regex

parent 65777ed7
......@@ -72,13 +72,13 @@ if ( $asso->is_mailing_allowed() )
{
/* ACTIONS */
if (isset($_REQUEST['add_mailing'])) {
if (preg_match('/^[a-z-]{3,8}$/', strtolower($_REQUEST['add_mailing']), $name) === 1) {
if (preg_match('/^[a-z-]{3,20}$/', strtolower($_REQUEST['add_mailing']), $name) === 1) {
$mailing = new mailing($site->db, $site->dbrw);
$modere = ($site->user->is_in_group('root')) ? 1 : 0;
$mailing->create($name[0], $asso->id, $modere);
$cts->add_paragraph("Mailing ".$mailing->get_address()." créée!");
} else {
$cts->add_paragraph("Mailing ".$_REQUEST['add_mailing']." non valide (entre 3 et 8 lettres, tiret autorisé)");
$cts->add_paragraph("Mailing ".$_REQUEST['add_mailing']." non valide (entre 3 et 20 lettres, tiret autorisé)");
}
}
if (isset($_REQUEST['del_mailing'])) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment