From bfd521afccb7e62e892c3ef21b710add14330713 Mon Sep 17 00:00:00 2001 From: TheTroll Date: Tue, 16 Mar 2010 15:23:00 +0100 Subject: Fixed category search --- bin/vdr.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/vdr.php b/bin/vdr.php index 5aa3c65..88e3a11 100755 --- a/bin/vdr.php +++ b/bin/vdr.php @@ -122,7 +122,7 @@ function vdrgetcategories() return $catlist; } -function vdrgetchannels($category = "", $now) +function vdrgetchannels($category, $now) { global $vdrchannels; @@ -141,6 +141,8 @@ function vdrgetchannels($category = "", $now) return $chanlist; } + $cat_found = 0; + while ($line = fgets($fp, 1024)) { if (!$cat_found) @@ -156,8 +158,8 @@ function vdrgetchannels($category = "", $now) $cat = substr($cat, strlen($cat[0])+1); } - if ($cat = $category) - $cat_found = TRUE; + if ($cat == $category) + $cat_found = 1; } else if ($line[0] != "") { -- cgit v1.2.3