diff options
Diffstat (limited to '')
-rwxr-xr-x | configs/download.sh | 3 | ||||
-rw-r--r-- | model/Upcoming.php | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/configs/download.sh b/configs/download.sh index 6010291..658b49d 100755 --- a/configs/download.sh +++ b/configs/download.sh @@ -5,3 +5,6 @@ wget -q "http://events.ccc.de/congress/2014/Fahrplan/schedule.xml" -O /tmp/sched # vod json wget -q "http://cdn.c3voc.de/releases/relive/index.json" -O /tmp/vod.json && mv /tmp/vod.json vod.json + +# eventkalender upcoming +wget -q --no-check-certificate "https://c3voc.de/eventkalender/events.json?filter=upcoming" -O /tmp/upcoming.json && mv /tmp/upcoming.json upcoming.json diff --git a/model/Upcoming.php b/model/Upcoming.php index 1724d0f..d737574 100644 --- a/model/Upcoming.php +++ b/model/Upcoming.php @@ -5,14 +5,14 @@ class Upcoming public function getNextEvents() { try { - $events = file_get_contents('https://c3voc.de/eventkalender/events.json?filter=upcoming'); + $events = file_get_contents('configs/upcoming.json'); $events = json_decode($events, true); return array_values($events['voc_events']); } catch(ErrorException $e) { - return null; + return array(); } } } |