From ce2579aff6186f0b5e544475890e1a43f1509867 Mon Sep 17 00:00:00 2001 From: radiskull Date: Thu, 1 Dec 2011 20:13:18 +0000 Subject: [PATCH] --- ag/clan/kampf_info.php | 2 +- ag/include/user.inc.php | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/ag/clan/kampf_info.php b/ag/clan/kampf_info.php index bdd0af8..e5a42a3 100644 --- a/ag/clan/kampf_info.php +++ b/ag/clan/kampf_info.php @@ -166,7 +166,7 @@ function displayShowChallenge($clan_challenge_id, $user) { $char = getChar($user_clan_chars[$i]); $char_owner = getOwnerOfChar($char['id']); echo ''.$char['name'].' '; - echo '('.$char_owner['nickname'].')'; + echo '('.$char_owner['nickname'].')'; if(isUserOwnerOf($user['id'], $char['id'])) { echo 'abmelden'; } diff --git a/ag/include/user.inc.php b/ag/include/user.inc.php index 1aed720..e5f3910 100644 --- a/ag/include/user.inc.php +++ b/ag/include/user.inc.php @@ -36,12 +36,9 @@ function getOwnerOfChar($charid, $buffer_enabled = true) { if(!is_numeric($charid)){ return null; } - // Wenn Char nicht im Puffer ist, oder nicht gepuffert werden soll - if ($GLOBALS['user_buffered_instances'][$userid] == null || !$buffer_enabled) { - $user = mysql_fetch_assoc(mysql_query('SELECT u.nickname, u.id FROM user u INNER JOIN chars ch ON ch.besitzer=u.id WHERE ch.id = '.$charid)); - $GLOBALS['user_buffered_instances'][$userid] = $user; - } - return $GLOBALS['user_buffered_instances'][$userid]; + + $user = mysql_fetch_assoc(mysql_query('SELECT u.id FROM user u INNER JOIN chars ch ON ch.besitzer=u.id WHERE ch.id = '.$charid)); + return getUser($user['id']); } function addMoneyToUser($userid, $amount) {