summaryrefslogtreecommitdiff
path: root/tdd-protocol.php
diff options
context:
space:
mode:
Diffstat (limited to 'tdd-protocol.php')
-rw-r--r--tdd-protocol.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/tdd-protocol.php b/tdd-protocol.php
index 7f6eb7b..3dcc0d8 100644
--- a/tdd-protocol.php
+++ b/tdd-protocol.php
@@ -18,7 +18,12 @@ if($request_uri_ending != '/' . $html_filename) {
//
$deals_by_tables = load_deals_for_tables($prefix, $round, $board);
-foreach($deals_by_tables as $table => $deal) {
- $protocol->set_deal($table, $deal);
+if (count($deals_by_tables) > 0) {
+ foreach($deals_by_tables as $table => $deal) {
+ $protocol->set_deal($table, $deal);
+ }
+ echo $protocol->output();
+}
+else {
+ readfile($html_filename);
}
-echo $protocol->output();