Update the count when an admin goes to admin/validate.
[platal.git] / modules / xnetgrp.php
index 79496d2..85009c3 100644 (file)
@@ -221,7 +221,7 @@ class XnetGrpModule extends PLModule
         global $globals;
         $page->changeTpl('xnetgrp/edit.tpl');
 
-        if (Post::has('submit')) {
+        if (Post::has('submit') && S::has_xsrf_token()) {
             if (S::has_perms()) {
                 if (Post::v('mail_domain') && (strstr(Post::v('mail_domain'), '.') === false)) {
                     $page->trig("le domaine doit être un FQDN (aucune modif effectuée) !!!");
@@ -272,6 +272,8 @@ class XnetGrpModule extends PLModule
             }
 
             pl_redirect('../'.Post::v('diminutif', $globals->asso('diminutif')).'/edit');
+        } else if (Post::has('submit')) {
+            $page->trig("La mise à jour des paramètres du groupe a échouée, merci de réssayer.");
         }
 
         if (S::has_perms()) {