From f0c2649d97699a3f5393e712f9b38a12744a8426 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Sun, 5 Apr 2015 17:53:52 +0200 Subject: Return empty Schedule when Conference is Closed --- view/schedule-json.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'view') 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()); -- cgit v1.2.3