From e0200f5968480f50cb503c550dff5ab79a514b25 Mon Sep 17 00:00:00 2001 From: TheTroll Date: Fri, 26 Feb 2010 17:29:00 +0100 Subject: Fixed chan logo when chan name has a / --- includes/inc_stream.php | 12 ++++++++---- includes/inc_vdr.php | 5 +++-- 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'includes') diff --git a/includes/inc_stream.php b/includes/inc_stream.php index b98b132..d6297e0 100755 --- a/includes/inc_stream.php +++ b/includes/inc_stream.php @@ -25,12 +25,14 @@ if (infostreamexist()) switch ($type) { case 1: - $logopath = "logos/" .$realname .".png"; + $channoslash = preg_replace("$/$", " ", $realname); + $logopath = "logos/" .$channoslash .".png"; if (!file_exists($logopath)) $logopath = "logos/nologoTV.png"; break; case 2: - $logopath = "logos/" .$realname .".png"; + $channoslash = preg_replace("$/$", " ", $realname); + $logopath = "logos/" .$channslash .".png"; if (!file_exists($logopath)) $logopath = "logos/nologoREC.png"; break; @@ -129,12 +131,14 @@ else switch ($type) { case 1: - $logopath = "logos/" .$realname .".png"; + $channoslash = preg_replace("$/$", " ", $realname); + $logopath = "logos/" .$channoslash .".png"; if (!file_exists($logopath)) $logopath = "logos/nologoTV.png"; break; case 2: - $logopath = "logos/" .$realname .".png"; + $channoslash = preg_replace("$/$", " ", $realname); + $logopath = "logos/" .$channoslash .".png"; if (!file_exists($logopath)) $logopath = "logos/nologoREC.png"; break; diff --git a/includes/inc_vdr.php b/includes/inc_vdr.php index d8ebf93..ac6be1d 100755 --- a/includes/inc_vdr.php +++ b/includes/inc_vdr.php @@ -248,10 +248,11 @@ function vdrlistchannels($category = "NULL") print "
  • "; $chan2=addslashes($chan); print " \r\n"; - if (!file_exists('logos/'.$chan.'.png')) + $channoslash = preg_replace("$/$", " ", $chan); + if (!file_exists('logos/'.$channoslash.'.png')) print " \r\n"; else - print " \r\n"; + print " \r\n"; print " $chan\r\n"; print " $epgtitle\r\n
  • \r\n"; print "
    "; -- cgit v1.2.3