From c32a1efe3394b6e072a0f96bdd0b9a5d91b8a57b Mon Sep 17 00:00:00 2001
From: Penny Leach
Date: Fri, 14 Jul 2006 21:10:35 +1200
Subject: [PATCH] fixed broken categories
---
include/breakfast.inc.php | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
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 .= ''.((!empty($person['alias'])) ? $person['alias'] : $person['name']).' | '.$person['meal'].' | ';
foreach ($person['scores'] as $category => $score) {
- if (!array_key_exists($category,$categories)) {
- $categories[$category] = $score['weight'];
- }
$tabledata .= ''.$score['score'].' | ';
}
$tabledata .= ''.$person['totals']['scores'].'% | ';
--
2.39.5