diff --git a/fair_stats.php b/fair_stats.php
index 7eb64b2..eb0578f 100644
--- a/fair_stats.php
+++ b/fair_stats.php
@@ -102,7 +102,7 @@ $server_config['info'] = false;
$server_config['next_chair'] = false;
$server_config['scholarships'] = false;
$server_config['delegates'] = false;
-
+$server_any_stats = false;
$year = intval($_POST['year']);
if($year < 1900) $year = $config['FAIRYEAR'];
@@ -113,7 +113,11 @@ echo mysql_error();
$fair = mysql_fetch_assoc($q);
$s = split(',', $fair['gather_stats']);
-foreach($s as $k) $server_config[$k] = true;
+foreach($s as $k) {
+ if(trim($k) == '') continue;
+ $server_config[$k] = true;
+ $server_any_stats = true;
+}
/*
@@ -323,7 +327,13 @@ $stats = mysql_fetch_assoc($q);
echo '
';
}
- echo "";
+if($server_any_stats == false) {
+ /* Every condition below will fail, tell the user something */
+ echo i18n("No stats to gather. Contact the admins if you believe this is an error.");
+} else {
+ echo "";
+}
+
echo '';
echo "
";
echo "
";