fixed tournaments and clan fights

main
hecht 7 years ago
parent 2f9b2ed4a3
commit 5962016c16

@ -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;

@ -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();
}

@ -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);

Loading…
Cancel
Save