From 76769f9a0d4070f48c5d90d0ccf583fe8f30e210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Garnier?= Date: Mon, 9 Jan 2023 10:06:26 +0100 Subject: [PATCH] correction --- WEB/Controller/PartieGateway.php | 4 ++-- WEB/Controller/UserController.php | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/WEB/Controller/PartieGateway.php b/WEB/Controller/PartieGateway.php index 17eb0b0e..8f3dcda0 100644 --- a/WEB/Controller/PartieGateway.php +++ b/WEB/Controller/PartieGateway.php @@ -251,14 +251,14 @@ class PartieGateway throw new Exception("La partie est pleine"); } if ($player + 1 == $playerNumberPerGame) { - echo "La partie est all"; + echo "La partie est all\n"; $query = "INSERT INTO Participer VALUES (:partie,:utilisateur,1)"; $this->con->executeQuery($query, array( "partie" => array($idPartie, SQLITE3_INTEGER), "utilisateur" => array($mailUtilisateur, SQLITE3_TEXT))); } else { - echo "La partie n'est pas alll"; + echo "La partie n'est pas all\n"; $query = "INSERT INTO Participer VALUES (:partie,:utilisateur,0)"; $this->con->executeQuery($query, array( "partie" => array($idPartie, SQLITE3_INTEGER), diff --git a/WEB/Controller/UserController.php b/WEB/Controller/UserController.php index e2384ebb..4f2223a9 100644 --- a/WEB/Controller/UserController.php +++ b/WEB/Controller/UserController.php @@ -177,15 +177,15 @@ class UserController $idPartie = $reponse[0]; if($etat == 1){ // header("Location: index.php?action=launchGame"); - header("Location: index.php"); + header("Location: index.php?action=goToPresentation"); } else{ echo "Vous ĂȘtes dans la fille d'attente\n"; require($rep . $vues['queue']); - // while ($etat == 0){ - // $etat = $model->getEtatPartie($idPartie); - // } - // header("Location: index.php"); + while ($etat == 0){ + $etat = $model->getEtatPartie($idPartie); + } + header("Location: index.php?action=goToPresentation"); } } catch (Exception $e) { $error = $e->getMessage();