From 66a2222dc3a8203dc9036a1011809f85ff7346b8 Mon Sep 17 00:00:00 2001 From: hecht Date: Tue, 2 Sep 2014 10:44:56 +0000 Subject: [PATCH] ooooops --- cronjob/clan_fight_auswertung.php | 7 ++++--- cronjob/generic_turnier.php | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cronjob/clan_fight_auswertung.php b/cronjob/clan_fight_auswertung.php index 5afe8d2..b969977 100755 --- a/cronjob/clan_fight_auswertung.php +++ b/cronjob/clan_fight_auswertung.php @@ -7,7 +7,7 @@ include_once(ROOT_PATH.'/include/elo.inc.php'); include_once(ROOT_PATH.'/include/semaphore.inc.php'); function getClanRanking() { - $qry = mysql_query('SELECT id from clan ORDER by elo desc LIMIT 10'); + $qry = mysql_query('SELECT id, elo from clan ORDER by elo desc LIMIT 10'); $clan_ids = array(); while($res = mysql_fetch_row($qry)) $clan_ids[] = $res; @@ -17,7 +17,8 @@ function getClanRanking() { function distributeClanPrices(array $prices, array $results) { $n = min(count($prices), count($results)); - + echo "Resultate"; + print_r($results); for($i = 0; $i<$n; $i++) { $points = $prices[$i]; foreach($results[$i] as $winner) { @@ -116,4 +117,4 @@ if(!semaphoreUP($ressource)) { } -?> \ No newline at end of file +?> diff --git a/cronjob/generic_turnier.php b/cronjob/generic_turnier.php index 9f54ba3..00a2b16 100644 --- a/cronjob/generic_turnier.php +++ b/cronjob/generic_turnier.php @@ -180,7 +180,7 @@ $row = mysql_fetch_assoc($qry); if($row['anzahl'] < $anzahl){ echo $name.' konnte nicht mit '.$anzahl.' Chars gestartet werden, da es nur '.$row['anzahl'].' von '.$anzahl.' nötigen Chars gibt!
'; - $anzahl = pow(2, round(log($row['anzahl'], 2),0)); + $anzahl = pow(2, floor(log($row['anzahl'], 2))); echo $name.' wird nun mit '.$anzahl.' Chars gestartet!
'; }