Fix use of old db

This commit is contained in:
osaajani 2019-11-04 18:23:11 +01:00
parent 628527c70f
commit 46ebd39c04
6 changed files with 54 additions and 48 deletions

View file

@ -84,7 +84,6 @@ namespace controllers\publics;
*/
public function edit()
{
global $db;
$ids = $_GET['ids'] ?? [];
$commands = $this->internal_command->gets($ids);

View file

@ -62,7 +62,6 @@ namespace controllers\publics;
$_SESSION['connect'] = true;
$_SESSION['user'] = $user;
$_SESSION['csrf'] = str_shuffle(uniqid().uniqid());
return $this->redirect(\descartes\Router::url('Dashboard', 'show'));
}
@ -88,9 +87,7 @@ namespace controllers\publics;
if (!$this->verify_csrf($csrf))
{
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Jeton CSRF invalid !');
$this->redirect(\descartes\Router::url('Connect', 'forget_password'));
return false;
return $this->redirect(\descartes\Router::url('Connect', 'forget_password'));
}
$email = $_POST['email'] ?? false;
@ -99,9 +96,7 @@ namespace controllers\publics;
if (!$email || !$user)
{
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Aucun utilisateur n\'existe pour cette adresse mail.');
$this->redirect(\descartes\Router::url('Connect', 'forget_password'));
return false;
return $this->redirect(\descartes\Router::url('Connect', 'forget_password'));
}
$Tokenista = new \Ingenerator\Tokenista(APP_SECRET);
@ -149,6 +144,6 @@ namespace controllers\publics;
{
session_unset();
session_destroy();
$this->redirect(\descartes\Router::url('Connect', 'login'));
return $this->redirect(\descartes\Router::url('Connect', 'login'));
}
}

View file

@ -61,7 +61,6 @@ namespace controllers\publics;
if (!$this->verify_csrf($csrf))
{
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Jeton CSRF invalid !');
return $this->redirect(\descartes\Router::url('Contact', 'list'));
}
@ -91,7 +90,6 @@ namespace controllers\publics;
*/
public function edit()
{
global $db;
$ids = $_GET['ids'] ?? [];
$contacts = $this->internal_contact->gets($ids);

View file

@ -53,9 +53,6 @@ namespace controllers\publics;
*/
public function show()
{
//Creation de l'object de base de données
global $db;
//Recupération des nombres des 4 panneaux d'accueil
$nb_contacts = $this->internal_contact->count();
$nb_groups = $this->internal_group->count();