From: Penny Leach Date: Fri, 14 Jul 2006 09:10:35 +0000 (+1200) Subject: fixed broken categories X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c32a1efe3394b6e072a0f96bdd0b9a5d91b8a57b;p=s9y.git fixed broken categories --- diff --git a/include/breakfast.inc.php b/include/breakfast.inc.php index 18afd3f..f75970a 100644 --- a/include/breakfast.inc.php +++ b/include/breakfast.inc.php @@ -47,14 +47,17 @@ if ($path = breakfast_has_photos($eventdate)) { $output .='

'.((!empty($latest['overallcomment'])) ? '

'.$latest['overallcomment'].'

' : '').' '; +$cats = serendipity_db_query('SELECT * FROM mbg_category'); $categories = array(); +foreach ($cats as $c) { + error_log(print_r($c,true)); + $categories[$c['category']] = $c['weight']; +} +error_log(print_r($categories,true)); $tabledata = ''; foreach ($latest['attendees'] as $person) { $tabledata .= ''; foreach ($person['scores'] as $category => $score) { - if (!array_key_exists($category,$categories)) { - $categories[$category] = $score['weight']; - } $tabledata .= ''; } $tabledata .= '';
'.((!empty($person['alias'])) ? $person['alias'] : $person['name']).''.$person['meal'].''.$score['score'].''.$person['totals']['scores'].'%