From 98f9ba9e27aaaedcf7bf57b9103d82d336c0ef30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Garnier?= Date: Thu, 12 Jan 2023 07:05:26 +0100 Subject: [PATCH] Correction de bug --- WEB/Controller/UserController.php | 2 +- WEB/View/src/pages/Multijoueur/Partie.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/WEB/Controller/UserController.php b/WEB/Controller/UserController.php index 282812d5..126c193d 100644 --- a/WEB/Controller/UserController.php +++ b/WEB/Controller/UserController.php @@ -251,13 +251,13 @@ class UserController $utilisateur = $_SESSION['utilisateur']; $idPartie = $_GET['idPartie']; $index = $_GET['index']; + $dateDebut = $model->getDateDebut($idPartie); $lastIndex = $model->getLastIndex($idPartie); if ($lastIndex != 0 && $index == $lastIndex + 1) { if ($model->checkGameIsEnd($idPartie)) { $this->endGame(); return; } - $dateDebut = $model->getDateDebut($idPartie); $points = $model->getPointsAtTheEnd($utilisateur->getEmail(), $idPartie); require($rep . $vues['lobbyEnd']); } else { diff --git a/WEB/View/src/pages/Multijoueur/Partie.php b/WEB/View/src/pages/Multijoueur/Partie.php index ebd45ddf..8f42fdb8 100644 --- a/WEB/View/src/pages/Multijoueur/Partie.php +++ b/WEB/View/src/pages/Multijoueur/Partie.php @@ -170,7 +170,6 @@ var enigmeId = 'getIdEnigme(); ?>'; console.log("[Savecode]index : " + index, "[Savecode]enigmeId : " + enigmeId); var xhr = new XMLHttpRequest(); - // xhr.open('POST', 'http://localhost/Scripted/WEB/index.php?action=saveCode', true); xhr.open('POST', 'http://82.165.180.114/Scripted/WEB/index.php?action=saveCodeMulti', true); xhr.responseType = 'text'; xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');