From 4e91b02f0769432b4f7b5b8f077c371e945e3040 Mon Sep 17 00:00:00 2001 From: Martin Ambrus Date: Mon, 6 Nov 2017 21:05:28 +0100 Subject: [PATCH] fix: removing single medal from player Relates to #283 --- Admin/Templates/playerinfo.tpl | 1 + GameEngine/Admin/Mods/medals.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Admin/Templates/playerinfo.tpl b/Admin/Templates/playerinfo.tpl index 815f8911..370b0afd 100644 --- a/Admin/Templates/playerinfo.tpl +++ b/Admin/Templates/playerinfo.tpl @@ -267,3 +267,4 @@ + \ No newline at end of file diff --git a/GameEngine/Admin/Mods/medals.php b/GameEngine/Admin/Mods/medals.php index 21831829..dd8a7433 100755 --- a/GameEngine/Admin/Mods/medals.php +++ b/GameEngine/Admin/Mods/medals.php @@ -24,8 +24,8 @@ $admid = (int) $_POST['admid']; mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."medal set del = 1 WHERE id = ".$medalid.""); -$name = mysqli_query($GLOBALS["link"], "SELECT name FROM ".TB_PREFIX."users WHERE id= ".$uid.""); -$name = mysqli_result($name, 0); +$name = mysqli_fetch_array(mysqli_query($GLOBALS["link"], "SELECT name FROM ".TB_PREFIX."users WHERE id= ".$uid.""), MYSQLI_ASSOC); +$name = $name['name']; mysqli_query($GLOBALS["link"], "Insert into ".TB_PREFIX."admin_log values (0,$admid,'Deleted medal id [#".$medalid."] from the user $name ',".time().")");