aboutsummaryrefslogtreecommitdiff
path: root/view/program-json.php
diff options
context:
space:
mode:
authorMaZderMind2015-03-31 17:16:21 +0200
committerMaZderMind2015-03-31 17:16:21 +0200
commitc01f7979db801aca3cd42234cc4a7fafaec0a9cd (patch)
tree8642285fa2d98dd5297169553dcb7096eef7b054 /view/program-json.php
parent2fc4bc9dca86d5a96a812cd23f1f5096f2dcc725 (diff)
Move Schedule-Availability Checks, too
Diffstat (limited to '')
-rw-r--r--view/program-json.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/view/program-json.php b/view/program-json.php
index 4cce716..08f4289 100644
--- a/view/program-json.php
+++ b/view/program-json.php
@@ -1,4 +1,8 @@
<?php
+$schedule = new Schedule();
+if(!$schedule->isEnabled())
+ throw new NotFoundException('Schedule is disabled');
+
header('Content-Type: application/json');
echo json_encode(program());