mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
Rename a few classes, fix bugs, fix syntax
This commit is contained in:
parent
7cb963b8cf
commit
bda1c7ddfd
18 changed files with 106 additions and 37 deletions
|
@ -70,6 +70,7 @@ namespace controllers\publics;
|
|||
if (!$this->verify_csrf($csrf))
|
||||
{
|
||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Jeton CSRF invalid !');
|
||||
|
||||
return $this->redirect(\descartes\Router::url('Group', 'list'));
|
||||
}
|
||||
|
||||
|
@ -120,6 +121,7 @@ namespace controllers\publics;
|
|||
if (!$this->verify_csrf($csrf))
|
||||
{
|
||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Jeton CSRF invalid !');
|
||||
|
||||
return $this->redirect(\descartes\Router::url('Group', 'add'));
|
||||
}
|
||||
|
||||
|
@ -129,6 +131,7 @@ namespace controllers\publics;
|
|||
if (!$name || !$contacts_ids)
|
||||
{
|
||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Des champs sont manquants !');
|
||||
|
||||
return $this->redirect(\descartes\Router::url('Group', 'add'));
|
||||
}
|
||||
|
||||
|
@ -136,10 +139,12 @@ namespace controllers\publics;
|
|||
if (!$id_group)
|
||||
{
|
||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Impossible de créer ce groupe.');
|
||||
|
||||
return $this->redirect(\descartes\Router::url('Group', 'add'));
|
||||
}
|
||||
|
||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('success', 'Le groupe a bien été créé.');
|
||||
|
||||
return $this->redirect(\descartes\Router::url('Group', 'list'));
|
||||
}
|
||||
|
||||
|
@ -156,6 +161,7 @@ namespace controllers\publics;
|
|||
if (!$this->verify_csrf($csrf))
|
||||
{
|
||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Jeton CSRF invalid !');
|
||||
|
||||
return $this->redirect(\descartes\Router::url('Group', 'list'));
|
||||
}
|
||||
|
||||
|
@ -170,10 +176,12 @@ namespace controllers\publics;
|
|||
if ($nb_groups_update !== \count($groups))
|
||||
{
|
||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Certains groupes n\'ont pas pu êtres mis à jour.');
|
||||
|
||||
return $this->redirect(\descartes\Router::url('Group', 'list'));
|
||||
}
|
||||
|
||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('success', 'Tous les groupes ont été modifiés avec succès.');
|
||||
|
||||
return $this->redirect(\descartes\Router::url('Group', 'list'));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue