From da739f3b60a30d5dd5c7877742f8b5c292f25f46 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Sun, 18 Dec 2016 10:37:10 +0100 Subject: use the new cache-files for viewing --- model/Relive.php | 2 +- model/Schedule.php | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/model/Relive.php b/model/Relive.php index 1e8266a..542836d 100644 --- a/model/Relive.php +++ b/model/Relive.php @@ -31,7 +31,7 @@ class Relive public function getTalks() { - if(!file_exists($this->getJsonUrl())) + if(!file_exists($this->getJsonCache())) return array(); $talks = file_get_contents($this->getJsonUrl()); diff --git a/model/Schedule.php b/model/Schedule.php index 6536864..b54709e 100644 --- a/model/Schedule.php +++ b/model/Schedule.php @@ -36,17 +36,10 @@ class Schedule private function fetchSchedule() { - $opts = array( - 'http' => array( - 'timeout' => 2, - 'user_agent' => 'C3VOC Universal Streaming-Website Backend @ '.$_SERVER['HTTP_HOST'], - ) - ); - $context = stream_context_create($opts); - $schedule = file_get_contents($this->getScheduleUrl(), false, $context); + $schedule = file_get_contents($this->getScheduleCache()); if(!$schedule) - throw new ScheduleException("Error Downloading Schedule from ".$this->getConference()->getScheduleUrl()); + throw new ScheduleException("Error Loading Schedule from ".$this->getScheduleCache()); return simplexml_load_string($schedule); } -- cgit v1.2.3