From 3c3d48c02730a826c7677dad2aaa01caf8e6de8b Mon Sep 17 00:00:00 2001 From: piernov Date: Wed, 27 Apr 2016 19:34:56 +0200 Subject: Also handle GET request for op in craftmine.php --- craftmine.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/craftmine.php b/craftmine.php index 78c5e37..dd2aa9e 100644 --- a/craftmine.php +++ b/craftmine.php @@ -7,6 +7,8 @@ require_once("inc/craftmine.inc"); session_start(); // Must be placed *BEFORE* $_SESSION is actually used and *AFTER* all classes are imported +$op = ""; + /** * Indique au client une message requete. */ @@ -27,14 +29,16 @@ function reportBadRequest() { exit(); } if (!isset($_POST["op"])) { - reportBadRequest(); -} + if(!isset($_GET["op"])) + reportBadRequest(); + else + $op = $_GET["op"]; +} else $op = $_POST["op"]; /** * On récupère l'opération à exécuter et on le fait. */ -$op = $_POST["op"]; switch($op) { case "withdrawMine": withdrawMine(); break; case "createGuild": createGuild(); break; -- cgit v1.2.3-70-g09d2