From 5962016c1682585ae91c2c0bd34ca0142b922b6a Mon Sep 17 00:00:00 2001 From: hecht Date: Sat, 23 Sep 2017 08:20:54 +0000 Subject: [PATCH] fixed tournaments and clan fights --- ag/clan/kampf_info.php | 2 +- ag/gm/include/tournament.inc.php | 6 +++--- ag/include/clan_fights.inc.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ag/clan/kampf_info.php b/ag/clan/kampf_info.php index 4c898a6..0a64f43 100644 --- a/ag/clan/kampf_info.php +++ b/ag/clan/kampf_info.php @@ -59,7 +59,7 @@ function displayChallengeClan($user, $clan_id) { return; } //TODO: es sollte hier unbedingt ne Auswahl geben wieviel Leute nun kämpfen dürfen :) - $result = challengeClan($user, $clan_id, 5); + $result = challengeClan($user, $clan_id, MIN_MEMBERS); if ($result != NULL) { displayErrorMessage(NULL, $result, displayHistoryBackLink()); return; diff --git a/ag/gm/include/tournament.inc.php b/ag/gm/include/tournament.inc.php index 612fcfc..9d9ca5f 100644 --- a/ag/gm/include/tournament.inc.php +++ b/ag/gm/include/tournament.inc.php @@ -29,16 +29,16 @@ function persistTournamentChanges($request) { if ($key == 'id') { continue; - } else if ($key == 'name') { + } else if ($key == 'name' || $key == 'abbrevation' || $key == 'icon' || $key == 'fruit_type') { $changes[] = $key.'=\''.$value.'\''; } else { $changes[] = $key.'='.$value; } } - $sql = 'UPDATE tournament_types SET '.join(',', $changes).' WHERE id = '.$request['id']; + $sql = 'UPDATE tournament_types SET '.join(', ', $changes).' WHERE id = '.$request['id']; // echo $sql; - silent_query($sql); + db_query($sql); return db_affected_rows(); } diff --git a/ag/include/clan_fights.inc.php b/ag/include/clan_fights.inc.php index dd661a3..6367963 100644 --- a/ag/include/clan_fights.inc.php +++ b/ag/include/clan_fights.inc.php @@ -46,7 +46,7 @@ $GLOBALS['clan_challenge_buffered_instances'] = array (); * @param int $clanid the id of the clan to challenge * @param int $validTime the amount of hours that the challenge is valid */ -function challengeClan(array $user, $clanid, $anzahl = 5, $type = DAVY_BACK_FIGHT, $validTime = 24) { +function challengeClan(array $user, $clanid, $anzahl = MIN_MEMBERS, $type = DAVY_BACK_FIGHT, $validTime = 24) { $clan = getClan($user['clan']); $oclan = getClan($clanid);