aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaZderMind2015-08-22 09:55:42 +0200
committerMaZderMind2015-08-22 09:55:42 +0200
commit91c7cbeb5e516b3839155135012be9052b468225 (patch)
treebd8634c274f1051de716ff141dd0494ed2e3f4d3
parent6842041bca1930c188effdf1b8dc124c1e5d8ca5 (diff)
Use downloaded upcoming.json
Diffstat (limited to '')
-rwxr-xr-xconfigs/download.sh3
-rw-r--r--model/Upcoming.php4
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();
}
}
}