fixes that were visible in the tests

main
hecht 13 years ago
parent f22c482746
commit 90ab4c049e

@ -101,7 +101,8 @@ function displayShowChallenge($clan_challenge_id, $user) {
} else { } else {
$other_clan = getClan($participating_clan_ids[1]); $other_clan = getClan($participating_clan_ids[1]);
} }
$clan_challenge = getChallenge($clan_challenge_id);
$anzahl = $clan_challenge['anzahl_slots'];
$user_clan_chars = getParticipatingCharIDs($clan_challenge_id, $user_clan['id']); $user_clan_chars = getParticipatingCharIDs($clan_challenge_id, $user_clan['id']);
$other_clan_chars = getParticipatingCharIDs($clan_challenge_id, $other_clan['id']); $other_clan_chars = getParticipatingCharIDs($clan_challenge_id, $other_clan['id']);
$user_chars = getCharsOfUser($user['id']); $user_chars = getCharsOfUser($user['id']);
@ -118,7 +119,7 @@ function displayShowChallenge($clan_challenge_id, $user) {
<th colspan="3"><?php echo $other_clan['clanname'];?></th> <th colspan="3"><?php echo $other_clan['clanname'];?></th>
</tr> </tr>
<?php <?php
for ($i = 1; $i < 6; $i++) { for ($i = 1; $i <= $anzahl; $i++) {
echo '<tr>'; echo '<tr>';
echo '<td><b>Slot '.$i.'</b></td>'; echo '<td><b>Slot '.$i.'</b></td>';
if($other_clan_chars[$i] != null) { if($other_clan_chars[$i] != null) {
@ -133,7 +134,7 @@ function displayShowChallenge($clan_challenge_id, $user) {
<th colspan="3"><?php echo $user_clan['clanname'];?></th> <th colspan="3"><?php echo $user_clan['clanname'];?></th>
</tr> </tr>
<?php <?php
for ($i = 1; $i < 6; $i++) { for ($i = 1; $i <= $anzahl; $i++) {
echo '<tr>'; echo '<tr>';
echo '<td><b>Slot '.$i.'</b></td>'; echo '<td><b>Slot '.$i.'</b></td>';
if($user_clan_chars[$i] != null) { if($user_clan_chars[$i] != null) {
@ -235,7 +236,9 @@ function displayClanFightMenu($user) {
$user_clan = getClan($user['clan']); $user_clan = getClan($user['clan']);
$clans_tmp = getClanFightCapableClanIds(); $clans_tmp = getClanFightCapableClanIds();
foreach ($clans_tmp as $clan_tmp_id) { foreach ($clans_tmp as $clan_tmp_id) {
$clans[] = getClan($clan_tmp_id); if($user['clan'] != $clan_tmp_id) {
$clans[] = getClan($clan_tmp_id);
}
} }
$open_challenge_requests = getOpenChallengeRequests($user_clan['id']); $open_challenge_requests = getOpenChallengeRequests($user_clan['id']);
$open_challenge_ids = getOpenChallengeIDs($user_clan['id']); $open_challenge_ids = getOpenChallengeIDs($user_clan['id']);

Loading…
Cancel
Save