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();