From d3728b89e060bbdc32f1447d6ea79b19dd7746e8 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Mon, 13 Apr 2009 15:45:00 +0000 Subject: tweaked fix for rss feed, makes it a little cleaner, fix custom port issue add debug event on unreadable, but still existing files --- lib/class/stream.class.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'lib/class/stream.class.php') diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php index 022e1e55..8b298917 100644 --- a/lib/class/stream.class.php +++ b/lib/class/stream.class.php @@ -863,14 +863,16 @@ class Stream { $web_path = Config::get('web_path'); if (Config::get('force_http_play') OR !empty(self::$force_http)) { - $port = Config::get('http_port'); - if (preg_match("/:\d+/",$web_path)) { - $web_path = str_replace("https://", "http://",$web_path); - } - else { - $web_path = str_replace("https://", "http://",$web_path); - } + $web_path = str_replace("https://", "http://",$web_path); } + if (Config::get('http_port') != '80') { + if (preg_match("/:(\d+)/",$web_path,$matches)) { + $web_path = str_replace(':' . $matches['1'],':' . Config::get('http_port'),$web_path); + } + else { + $web_path = str_replace($_SERVER['HTTP_HOST'],$_SERVER['HTTP_HOST'] . ':' . Config::get('http_port'),$web_path); + } + } $url = $web_path . "/play/index.php?$session_string"; -- cgit