aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiernov <piernov@piernov.org>2016-04-27 19:34:56 +0200
committerpiernov <piernov@piernov.org>2016-04-27 19:34:56 +0200
commit3c3d48c02730a826c7677dad2aaa01caf8e6de8b (patch)
treec3f0e6ecd8e429384112a52c50ff25e41600441b
parent8770f9ddccfafaad935f66ccbf254624b41545f3 (diff)
downloadcandybox-3c3d48c02730a826c7677dad2aaa01caf8e6de8b.tar.gz
candybox-3c3d48c02730a826c7677dad2aaa01caf8e6de8b.tar.bz2
candybox-3c3d48c02730a826c7677dad2aaa01caf8e6de8b.tar.xz
candybox-3c3d48c02730a826c7677dad2aaa01caf8e6de8b.zip
Also handle GET request for op in craftmine.php
-rw-r--r--craftmine.php10
1 files 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;