From 38d3711ace9f2b374983164df83c8c26244ffec3 Mon Sep 17 00:00:00 2001 From: dave Date: Thu, 17 Sep 2009 07:14:12 +0000 Subject: [PATCH] - Send the stats gathering list from the fair info --- xmltransport.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/xmltransport.php b/xmltransport.php index e6e2705..e6369e3 100644 --- a/xmltransport.php +++ b/xmltransport.php @@ -30,15 +30,11 @@ require_once('user.inc.php'); function handle_getstats(&$u, $fair,&$data, &$response) { $year = $data['getstats']['year']; - $vars = array('fair_stats_participation', 'fair_stats_schools_ext', - 'fair_stats_minorities', 'fair_stats_guests', - 'fair_stats_sffbc_misc', 'fair_stats_info', - 'fair_stats_next_chair', 'fair_stats_scholarships', - 'fair_stats_delegates', - ); - foreach($vars as $v) { - $response['statconfig'][$v] = $config[$v]; - } + + /* Send back the stats we'd like to collect */ + $response['statconfig'] = split(',', $fair['gather_stats']); + + /* Send back the stats we currently have */ $q = mysql_query("SELECT * FROM fairs_stats WHERE fairs_id='{$u['fairs_id']}' AND year='$year'"); $response['stats'] = mysql_fetch_assoc($q);