From 410c15c9977203db8ce788c365c797568ebc1c9d Mon Sep 17 00:00:00 2001 From: tobi132 Date: Tue, 23 Jul 2019 07:45:03 +0200 Subject: [PATCH] Fixed getItemNameById function Please reload your items in admin panel to make it work --- system/functions.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/system/functions.php b/system/functions.php index 24cbf0f1..1ba22520 100644 --- a/system/functions.php +++ b/system/functions.php @@ -137,14 +137,9 @@ function getGuildLink($name, $generate = true) } function getItemNameById($id) { - global $db; - $query = $db->query('SELECT `name` FROM `' . TABLE_PREFIX . 'items` WHERE `id` = ' . $db->quote($id) . ' LIMIT 1;'); - if($query->rowCount() === 1) { - $item = $query->fetch(); - return $item['name']; - } - - return ''; + require_once LIBS . 'items.php'; + $item = Items::get($id); + return $item['name']; } function getItemImage($id, $count = 1)