From 3475165b3082520cc96458fe79b597c14b7dc18f Mon Sep 17 00:00:00 2001 From: thchazot1 Date: Fri, 23 Dec 2022 19:32:23 +0100 Subject: [PATCH] wtf --- config/config.php | 8 ++++---- modeles/MdlListe.php | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config/config.php b/config/config.php index e6dc50d..a4ce07e 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"; @@ -13,7 +13,7 @@ $dsn="mysql:host=localhost;dbname=dbthchazot1"; */ $vues['erreur'] = 'Vues/erreur.php'; -$vues['addList'] = 'Vues/addList.php'; +$vues['addList'] = 'Vues/addListPriv.php'; $vues['addListVis'] = 'Vues/addListVis.php'; $vues['addTask'] = 'Vues/addTask.php'; $vues['modifyTask'] = 'Vues/modifyTask.php'; diff --git a/modeles/MdlListe.php b/modeles/MdlListe.php index 3c9ca42..e6b33da 100644 --- a/modeles/MdlListe.php +++ b/modeles/MdlListe.php @@ -55,18 +55,18 @@ class MdlListe{ return $tabListe; } - public function findById(string $id): Liste{ + public function findById(string $id): array{ $gate=new ListeGateway($this->con); $gateTache=new TacheGateway($this->con); $results=$gate->findById($id); - $tabListe=null; + $tabListe=[]; foreach ($results as $row ) { $tabTache=[]; $taches=$gateTache->getTacheFromIdList($row['id']); foreach($taches as $tata){ $tabTache[]=$tata; } - $tabListe=new Liste($row['id'], $row['name'], $row['private'], null, $tabTache); + $tabListe[]=new Liste($row['id'], $row['name'], $row['private'], null, $tabTache); } return $tabListe; }