diff --git a/Vues/addList.php b/Vues/addList.php index ce632c4..19c2bcd 100644 --- a/Vues/addList.php +++ b/Vues/addList.php @@ -24,7 +24,7 @@
Private - +
diff --git a/Vues/modifyTask.php b/Vues/modifyTask.php index 8741df9..81c3ce5 100644 --- a/Vues/modifyTask.php +++ b/Vues/modifyTask.php @@ -33,7 +33,7 @@ ?>
Complete - +
Complete - +
+ - diff --git a/config/config.php b/config/config.php index bd0643f..00e3c17 100644 --- a/config/config.php +++ b/config/config.php @@ -2,9 +2,9 @@ $rep = __DIR__ . '/../'; -$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) +$login="thchazot1"; +$password="achanger"; +$dsn="mysql:host=localhost;dbname=dbthchazot1";// chemin vers bd (mysql:host=londres.uca.local;dbname=dblibreton => pour l'iut) //$dsn="mysql:host=localhost;port=8888;dbname=bddDeQualite"; /* $login="thchazot1"; diff --git a/controllers/VisitorController.php b/controllers/VisitorController.php index 561a23b..e74ea15 100644 --- a/controllers/VisitorController.php +++ b/controllers/VisitorController.php @@ -233,14 +233,20 @@ class VisitorController { function UpdateTask($dVueEreur) { global $rep,$vues,$dataView; - $idTache=$_POST['task']; + $tache=$_POST['task']; $name=$_POST['name']; $content=$_POST['content']; - $completed=$_POST['completed']; + if ($_POST['completed']===null){ + $completed=false; + } + else{ + $completed=true; + } $model = new MdlTache(); - $model->update($idTache, $name, $content, $completed); - $_REQUEST['action']="accessListInfos"; - $this->accessListInfos($dVueEreur); + $tache=$model->findById($_POST['task']); + $model->update($tache, $name, $content, $completed); + $_REQUEST['action']="goHome"; + $this->Reinit(); $dVueEreur= array(); } } diff --git a/modeles/MdlTache.php b/modeles/MdlTache.php index 7240712..443883a 100644 --- a/modeles/MdlTache.php +++ b/modeles/MdlTache.php @@ -34,7 +34,7 @@ class MdlTache{ $gate->update($tache); } - public function findById(int $id){ + public function findById(int $id): Tache{ $gate=new TacheGateway($this->con); return $gate->findById($id);