aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.php10
-rw-r--r--view/schedule-json.php7
2 files changed, 11 insertions, 6 deletions
diff --git a/index.php b/index.php
index 7655881..cae238c 100644
--- a/index.php
+++ b/index.php
@@ -44,6 +44,11 @@ try {
require('view/feedback-read.php');
}
+ else if($route == 'schedule.json')
+ {
+ require('view/schedule-json.php');
+ }
+
else if($conference->isClosed())
{
require('view/closed.php');
@@ -59,11 +64,6 @@ try {
require('view/about.php');
}
- else if($route == 'schedule.json')
- {
- require('view/schedule-json.php');
- }
-
else if($route == 'multiview')
{
require('view/multiview.php');
diff --git a/view/schedule-json.php b/view/schedule-json.php
index 739b71b..b6fdfe5 100644
--- a/view/schedule-json.php
+++ b/view/schedule-json.php
@@ -5,4 +5,9 @@ if(!$schedule->isEnabled())
throw new NotFoundException('Schedule is disabled');
header('Content-Type: application/json');
-echo json_encode($schedule->getSchedule());
+
+if($conference->isClosed())
+ echo '{}';
+
+else
+ echo json_encode($schedule->getSchedule());