radiskull 13 years ago
parent b49c6a6a49
commit ce2579aff6

@ -166,7 +166,7 @@ function displayShowChallenge($clan_challenge_id, $user) {
$char = getChar($user_clan_chars[$i]); $char = getChar($user_clan_chars[$i]);
$char_owner = getOwnerOfChar($char['id']); $char_owner = getOwnerOfChar($char['id']);
echo '<td align="center"><a href="index.php?as=info&charm=1&char_id='.$char['id'].'">'.$char['name'].'</a> '; echo '<td align="center"><a href="index.php?as=info&charm=1&char_id='.$char['id'].'">'.$char['name'].'</a> ';
echo '(<a href="index.php?as=info&user_id='.$char_owner['id'].'">'.$char_owner['nickname'].'</a></td>)'; echo '(<a href="index.php?as=info&user_id='.$char_owner['id'].'">'.$char_owner['nickname'].'</a>)</td>';
if(isUserOwnerOf($user['id'], $char['id'])) { if(isUserOwnerOf($user['id'], $char['id'])) {
echo '<td align="center"><a href="index.php?as=clan/kampf_info&action=leavechallenge&challenge='.$clan_challenge_id.'&char='.$char['id'].'">abmelden</a></td>'; echo '<td align="center"><a href="index.php?as=clan/kampf_info&action=leavechallenge&challenge='.$clan_challenge_id.'&char='.$char['id'].'">abmelden</a></td>';
} }

@ -36,12 +36,9 @@ function getOwnerOfChar($charid, $buffer_enabled = true) {
if(!is_numeric($charid)){ if(!is_numeric($charid)){
return null; 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.id FROM user u INNER JOIN chars ch ON ch.besitzer=u.id WHERE ch.id = '.$charid));
$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)); return getUser($user['id']);
$GLOBALS['user_buffered_instances'][$userid] = $user;
}
return $GLOBALS['user_buffered_instances'][$userid];
} }
function addMoneyToUser($userid, $amount) { function addMoneyToUser($userid, $amount) {

Loading…
Cancel
Save