From 1e1902e52ff14f9ef3221134e6a0d5479c5e07e6 Mon Sep 17 00:00:00 2001 From: Pietro Date: Sun, 28 Apr 2019 12:39:34 +0200 Subject: [PATCH] Bug Fixes +Fixed a bug that didn't permit to edit raids --- GameEngine/Database.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/GameEngine/Database.php b/GameEngine/Database.php index 7976da2b..e244372e 100755 --- a/GameEngine/Database.php +++ b/GameEngine/Database.php @@ -7802,6 +7802,11 @@ function addSlotFarm($lid, $towref, $x, $y, $distance, $t1, $t2, $t3, $t4, $t5, function editSlotFarm($eid, $lid, $oldLid, $owner, $wref, $x, $y, $dist, $t1, $t2, $t3, $t4, $t5, $t6) { list($eid, $lid, $oldLid, $owner, $wref, $x, $y, $dist, $t1, $t2, $t3, $t4, $t5, $t6) = $this->escape_input((int) $eid, $lid, $oldLid, $owner, $wref, $x, $y, $dist, $t1, $t2, $t3, $t4, $t5, $t6); + for($i = 1; $i <= 6; $i++) { + if (${'t'.$i} == '') { + ${'t'.$i} = 0; + } + } $q = "UPDATE " . TB_PREFIX . "raidlist SET lid = '$lid', towref = '$wref', x = '$x', y = '$y', t1 = '$t1', t2 = '$t2', t3 = '$t3', t4 = '$t4', t5 = '$t5', t6 = '$t6' WHERE id = $eid AND lid = $oldLid AND EXISTS(SELECT 1 FROM " . TB_PREFIX . "farmlist WHERE id = $lid AND owner = $owner) AND EXISTS(SELECT 1 FROM " . TB_PREFIX . "farmlist WHERE id = $oldLid AND owner = $owner)"; return mysqli_query($this->dblink,$q); }