From 664fe7e953423790f556a0e9093a3d9667848567 Mon Sep 17 00:00:00 2001 From: Jacek Kowalski <Jacek@jacekk.info> Date: Fri, 12 Feb 2016 23:24:39 +0000 Subject: [PATCH] [mod_rss] Poprawka ładowania kanałów RSS (external entites) --- data/tv/xmltv_parse.php | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/tv/xmltv_parse.php b/data/tv/xmltv_parse.php index 4a9976b..505cd1e 100644 --- a/data/tv/xmltv_parse.php +++ b/data/tv/xmltv_parse.php @@ -6,7 +6,7 @@ static function schedule($id, $datetime=NULL) { if($datetime === NULL) $datetime = time(); - $dane = simplexml_load_file(self::$file); + $dane = simplexml_load_string(file_get_contents(self::$file)); $abc = $dane->xpath('programme[@channel=\''.$id.'\' and number(substring(@stop, 1, 12))>\''.date('YmdHi', $datetime).'\' and number(substring(@start, 1, 12))<\''.date('YmdHi', $datetime+(3600*24)).'\']'); $last = 0; @@ -37,7 +37,7 @@ $line = explode("\t", $line); for($i=0; $i<count($line); $i++) { - if($tv!==NULL AND funcs::utfToAscii($line[$i])==$tv) { + if($tv !== NULL AND funcs::utfToAscii($line[$i]) == $tv) { return $line[0]; } else @@ -47,7 +47,7 @@ } } - if($tv!==NULL) { + if($tv !== NULL) { return FALSE; } else -- Gitblit v1.9.1