From d808050e996273ff2693dadeab78f5db8c35139c Mon Sep 17 00:00:00 2001 From: Thomas Chazot Date: Fri, 23 Dec 2022 01:57:50 +0100 Subject: [PATCH] aled --- config/config.php | 1 - controllers/VisitorController.php | 2 -- modeles/MdlListe.php | 4 ++-- modeles/MdlTache.php | 4 ++-- modeles/MdlUser.php | 4 ++-- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/config/config.php b/config/config.php index e669aa8..57325d4 100644 --- a/config/config.php +++ b/config/config.php @@ -4,7 +4,6 @@ $rep = __DIR__ . '/../'; //$location = "Location : http://londres.uca.local/" Finir le chemin du public_html -$base="bddDeQualite"; //nom bdd $login="root"; $password="root"; $dsn="mysql:host=localhost;port=8888;dbname=bddDeQualite"; // chemin vers bd (mysql:host=londres.uca.local;dbname=dblibreton => pour l'iut) diff --git a/controllers/VisitorController.php b/controllers/VisitorController.php index 1e4d87f..11073c6 100644 --- a/controllers/VisitorController.php +++ b/controllers/VisitorController.php @@ -13,10 +13,8 @@ class VisitorController { try { $action = $_REQUEST['action']; - echo ($action); switch($action) { case NULL: - echo ("WESH"); $this->Reinit(); break; diff --git a/modeles/MdlListe.php b/modeles/MdlListe.php index ed979d5..3c5d5ae 100644 --- a/modeles/MdlListe.php +++ b/modeles/MdlListe.php @@ -5,8 +5,8 @@ class MdlListe{ private $con; - public function __construct(Connection $con){ - $this->con = $con; + public function __construct(){ + $this->con = new Connection($dsn, $login, $password); } diff --git a/modeles/MdlTache.php b/modeles/MdlTache.php index 280623f..8f6cec0 100644 --- a/modeles/MdlTache.php +++ b/modeles/MdlTache.php @@ -5,8 +5,8 @@ class MdlTache{ private $con; - public function __construct(Connection $con){ - $this->con = $con; + public function __construct(){ + $this->con = new Connection($dsn, $login, $password); } diff --git a/modeles/MdlUser.php b/modeles/MdlUser.php index 41a162f..a91db3d 100644 --- a/modeles/MdlUser.php +++ b/modeles/MdlUser.php @@ -5,8 +5,8 @@ class MdlUser{ private $con; - public function __construct(Connection $con){ - $this->con = $con; + public function __construct(){ + $this->con = new Connection($dsn, $login, $password); } public function connexion($login){